[dpdk-dev] [PATCH 3/3 v2] testpmd: support hardware offload to drop error packets

Asaf Penso asafp at nvidia.com
Thu Oct 8 17:06:23 CEST 2020


>-----Original Message-----
>From: dev <dev-bounces at dpdk.org> On Behalf Of nipun.gupta at nxp.com
>Sent: Monday, October 5, 2020 10:15 AM
>To: dev at dpdk.org
>Cc: NBU-Contact-Thomas Monjalon <thomas at monjalon.net>;
>ferruh.yigit at intel.com; arybchenko at solarflare.com;
>hemant.agrawal at nxp.com; sachin.saxena at nxp.com; rohit.raj at nxp.com;
>Nipun Gupta <nipun.gupta at nxp.com>
>Subject: [dpdk-dev] [PATCH 3/3 v2] testpmd: support hardware offload to
>drop error packets
>
>From: Nipun Gupta <nipun.gupta at nxp.com>
>
>With DEV_RX_OFFLOAD_ERR_PKT_DROP now defined as an offload
>capability, testpmd showcases this with a new added configuration option
>'enable-hw-drop-err'.
>
>Signed-off-by: Nipun Gupta <nipun.gupta at nxp.com>
>---
> app/test-pmd/parameters.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index
>1ead59579..ada870e2d 100644
>--- a/app/test-pmd/parameters.c
>+++ b/app/test-pmd/parameters.c
>@@ -142,6 +142,7 @@ usage(char* progname)
> 	printf("  --enable-hw-vlan-strip: enable hardware vlan strip.\n");
> 	printf("  --enable-hw-vlan-extend: enable hardware vlan extend.\n");
> 	printf("  --enable-hw-qinq-strip: enable hardware qinq strip.\n");
>+	printf("  --enable-hw-drop-err: enable hardware packet drop for error
>+packets.\n");
> 	printf("  --enable-drop-en: enable per queue packet drop.\n");
> 	printf("  --disable-rss: disable rss.\n");
> 	printf("  --port-topology=<paired|chained|loop>: set port topology
>(paired "
>@@ -631,6 +632,7 @@ launch_args_parse(int argc, char** argv)
> 		{ "enable-hw-vlan-strip",       0, 0, 0 },
> 		{ "enable-hw-vlan-extend",      0, 0, 0 },
> 		{ "enable-hw-qinq-strip",       0, 0, 0 },
>+		{ "enable-hw-drop-err",         0, 0, 0 },
> 		{ "enable-drop-en",            0, 0, 0 },
> 		{ "disable-rss",                0, 0, 0 },
> 		{ "port-topology",              1, 0, 0 },
>@@ -1037,6 +1039,9 @@ launch_args_parse(int argc, char** argv)
> 					"enable-hw-qinq-strip"))
> 				rx_offloads |=
>DEV_RX_OFFLOAD_QINQ_STRIP;
>
>+			if (!strcmp(lgopts[opt_idx].name, "enable-hw-drop-
>err"))
>+				rx_offloads |=
>DEV_RX_OFFLOAD_ERR_PKT_DROP;
>+
> 			if (!strcmp(lgopts[opt_idx].name, "enable-drop-en"))
> 				rx_drop_en = 1;
>
>--
>2.17.1

I think it would be good also to update testpmd run_app.rst with this new option.


More information about the dev mailing list