app/testpmd: set keep CRC offload flag
authorFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Jul 2018 18:44:52 +0000 (19:44 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 15 Jul 2018 22:41:33 +0000 (00:41 +0200)
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: 70815c9ecadd ("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>
app/test-pmd/parameters.c

index 7580762..962fad7 100644 (file)
@@ -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"))