app/testpmd: set keep CRC offload flag

Message ID 20180703184452.43832-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: set keep CRC offload flag |

Checks

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

Commit Message

Ferruh Yigit July 3, 2018, 6:44 p.m. UTC
  If "--disable-crc-strip" testpmd parameter issued, it removes the
DEV_RX_OFFLOAD_CRC_STRIP flag.
With introduction of new DEV_RX_OFFLOAD_KEEP_CRC offload flag, this
flag also should be set when this parameter issued.

Fixes: 3d12dceed2df ("ethdev: add new offload flag to keep CRC")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-pmd/parameters.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Comments

Iremonger, Bernard July 10, 2018, 1:43 p.m. UTC | #1
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, July 3, 2018 7:45 PM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: [PATCH] app/testpmd: set keep CRC offload flag
> 
> If "--disable-crc-strip" testpmd parameter issued, it removes the
> DEV_RX_OFFLOAD_CRC_STRIP flag.
> With introduction of new DEV_RX_OFFLOAD_KEEP_CRC offload flag, this flag
> also should be set when this parameter issued.
> 
> Fixes: 3d12dceed2df ("ethdev: add new offload flag to keep CRC")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
  
Thomas Monjalon July 15, 2018, 10:33 p.m. UTC | #2
10/07/2018 15:43, Iremonger, Bernard:
> From: Yigit, Ferruh
> > If "--disable-crc-strip" testpmd parameter issued, it removes the
> > DEV_RX_OFFLOAD_CRC_STRIP flag.
> > With introduction of new DEV_RX_OFFLOAD_KEEP_CRC offload flag, this flag
> > also should be set when this parameter issued.
> > 
> > Fixes: 3d12dceed2df ("ethdev: add new offload flag to keep CRC")
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Applied, thanks
  

Patch

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 75807623c..962fad789 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -878,8 +878,10 @@  launch_args_parse(int argc, char** argv)
 						 " must be >= 0\n", n);
 			}
 #endif
-			if (!strcmp(lgopts[opt_idx].name, "disable-crc-strip"))
+			if (!strcmp(lgopts[opt_idx].name, "disable-crc-strip")) {
 				rx_offloads &= ~DEV_RX_OFFLOAD_CRC_STRIP;
+				rx_offloads |= DEV_RX_OFFLOAD_KEEP_CRC;
+			}
 			if (!strcmp(lgopts[opt_idx].name, "enable-lro"))
 				rx_offloads |= DEV_RX_OFFLOAD_TCP_LRO;
 			if (!strcmp(lgopts[opt_idx].name, "enable-scatter"))