Skip to contentSkip to conversation

app/testpmd: set keep CRC offload flag

PATCH Applied Ferruh Yigit 3 participants 3 messages Jul 3, 2018 – Jul 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 app/test-pmd/parameters.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
app/test-pmd/parameters.c +3 -1
index 75807623c..962fad789 100644
@@ -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"))
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Yigit, Ferruh
Sent: Tuesday, July 3, 2018 7:45 PM
To: Lu, Wenzhuo <[email protected]>; Wu, Jingjing <[email protected]>; Iremonger, Bernard <[email protected]>
Cc: [email protected]; Yigit, Ferruh <[email protected]>
Subject: [PATCH] app/testpmd: set keep CRC offload flag

Quoted 8 lines

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")
#2 lore raw

10/07/2018 15:43, Iremonger, Bernard:

Quoted 11 lines

From: Yigit, Ferruh

Quoted 8 lines

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")

Applied, thanks