[dpdk-dev,dpdk-dev,v2,2/3] app: enable HW CRC strip by default

Message ID 1490003874-37766-2-git-send-email-jia.guo@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Guo, Jia March 20, 2017, 9:57 a.m. UTC
Since VF has no ability to disable/enable HW CRC strip for non-DPDK PF
drivers, and for most case of kernel driver default enable HW CRC strip,
if disable HW CRC strip in app's rxmode, VF driver will return fail and
result the VF launch failure. So this patch default to enable HW CRC strip
to let VF launch successful.

Signed-off-by: Jeff Guo <jia.guo@intel.com>
Cc: stable@dpdk.org
---
 app/test-pmd/testpmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jingjing Wu March 22, 2017, 12:22 p.m. UTC | #1
> -----Original Message-----
> From: Guo, Jia
> Sent: Monday, March 20, 2017 5:58 PM
> To: Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev v2 2/3] app: enable HW CRC strip by default
> 
> Since VF has no ability to disable/enable HW CRC strip for non-DPDK PF drivers,
> and for most case of kernel driver default enable HW CRC strip, if disable HW
> CRC strip in app's rxmode, VF driver will return fail and result the VF launch
> failure. So this patch default to enable HW CRC strip to let VF launch successful.
> 
> Signed-off-by: Jeff Guo <jia.guo@intel.com>
> Cc: stable@dpdk.org
> ---
>  app/test-pmd/testpmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> e04e215..f01522c 100644
> --- a/app/test-pmd/testpmd.c
> +++ b/app/test-pmd/testpmd.c
> @@ -284,7 +284,7 @@ struct rte_eth_rxmode rx_mode = {
>  	.hw_vlan_strip  = 1, /**< VLAN strip enabled. */
>  	.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
>  	.jumbo_frame    = 0, /**< Jumbo Frame Support disabled. */
> -	.hw_strip_crc   = 0, /**< CRC stripping by hardware disabled. */
> +	.hw_strip_crc   = 1, /**< CRC stripping by hardware disabled. */
>  };
> 
You change the default hw_strip_crc to 1, then the argument "crc-strip" of
testpmd becomes meaningless.
It's better to change it too.
  
Jingjing Wu March 22, 2017, 12:24 p.m. UTC | #2
> -----Original Message-----
> From: Wu, Jingjing
> Sent: Wednesday, March 22, 2017 8:22 PM
> To: Guo, Jia <jia.guo@intel.com>; Zhang, Helin <helin.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [dpdk-dev v2 2/3] app: enable HW CRC strip by default
> 
> 
> 
> > -----Original Message-----
> > From: Guo, Jia
> > Sent: Monday, March 20, 2017 5:58 PM
> > To: Zhang, Helin <helin.zhang@intel.com>; Wu, Jingjing
> > <jingjing.wu@intel.com>
> > Cc: dev@dpdk.org; Guo, Jia <jia.guo@intel.com>; stable@dpdk.org
> > Subject: [dpdk-dev v2 2/3] app: enable HW CRC strip by default
> >
> > Since VF has no ability to disable/enable HW CRC strip for non-DPDK PF
> > drivers, and for most case of kernel driver default enable HW CRC
> > strip, if disable HW CRC strip in app's rxmode, VF driver will return
> > fail and result the VF launch failure. So this patch default to enable HW CRC
> strip to let VF launch successful.
> >
> > Signed-off-by: Jeff Guo <jia.guo@intel.com>
> > Cc: stable@dpdk.org
> > ---
> >  app/test-pmd/testpmd.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index
> > e04e215..f01522c 100644
> > --- a/app/test-pmd/testpmd.c
> > +++ b/app/test-pmd/testpmd.c
> > @@ -284,7 +284,7 @@ struct rte_eth_rxmode rx_mode = {
> >  	.hw_vlan_strip  = 1, /**< VLAN strip enabled. */
> >  	.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
> >  	.jumbo_frame    = 0, /**< Jumbo Frame Support disabled. */
> > -	.hw_strip_crc   = 0, /**< CRC stripping by hardware disabled. */
> > +	.hw_strip_crc   = 1, /**< CRC stripping by hardware disabled. */
> >  };
> >
> You change the default hw_strip_crc to 1, then the argument "crc-strip" of
> testpmd becomes meaningless.
> It's better to change it too.

And the comment should be changed to enabled!
  

Patch

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e04e215..f01522c 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -284,7 +284,7 @@  struct rte_eth_rxmode rx_mode = {
 	.hw_vlan_strip  = 1, /**< VLAN strip enabled. */
 	.hw_vlan_extend = 0, /**< Extended VLAN disabled. */
 	.jumbo_frame    = 0, /**< Jumbo Frame Support disabled. */
-	.hw_strip_crc   = 0, /**< CRC stripping by hardware disabled. */
+	.hw_strip_crc   = 1, /**< CRC stripping by hardware disabled. */
 };
 
 struct rte_fdir_conf fdir_conf = {