Message ID | 20201005071506.28861-3-nipun.gupta@nxp.com |
---|---|
State | New |
Headers | show |
Series | [1/3,v2] ethdev: add rx offload to drop error packets | expand |
>-----Original Message----- >From: dev <dev-bounces@dpdk.org> On Behalf Of nipun.gupta@nxp.com >Sent: Monday, October 5, 2020 10:15 AM >To: dev@dpdk.org >Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; >ferruh.yigit@intel.com; arybchenko@solarflare.com; >hemant.agrawal@nxp.com; sachin.saxena@nxp.com; rohit.raj@nxp.com; >Nipun Gupta <nipun.gupta@nxp.com> >Subject: [dpdk-dev] [PATCH 3/3 v2] testpmd: support hardware offload to >drop error packets > >From: Nipun Gupta <nipun.gupta@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@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.
> -----Original Message----- > From: Asaf Penso <asafp@nvidia.com> > Sent: Thursday, October 8, 2020 8:36 PM > To: Nipun Gupta <nipun.gupta@nxp.com>; dev@dpdk.org > Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; > ferruh.yigit@intel.com; arybchenko@solarflare.com; Hemant Agrawal > <hemant.agrawal@nxp.com>; Sachin Saxena <sachin.saxena@nxp.com>; Rohit > Raj <rohit.raj@nxp.com> > Subject: RE: [dpdk-dev] [PATCH 3/3 v2] testpmd: support hardware offload to > drop error packets > > >-----Original Message----- > >From: dev <dev-bounces@dpdk.org> On Behalf Of nipun.gupta@nxp.com > >Sent: Monday, October 5, 2020 10:15 AM > >To: dev@dpdk.org > >Cc: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>; > >ferruh.yigit@intel.com; arybchenko@solarflare.com; > >hemant.agrawal@nxp.com; sachin.saxena@nxp.com; rohit.raj@nxp.com; > >Nipun Gupta <nipun.gupta@nxp.com> > >Subject: [dpdk-dev] [PATCH 3/3 v2] testpmd: support hardware offload to > >drop error packets > > > >From: Nipun Gupta <nipun.gupta@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@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. Sure. Will update in next spin. Thanks, Nipun
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;