ethdev: add new offload flag to keep CRC
[dpdk.git] / drivers / net / octeontx / octeontx_ethdev.c
index 1eb453b..6eb6836 100644 (file)
@@ -283,7 +283,10 @@ octeontx_dev_configure(struct rte_eth_dev *dev)
                return -EINVAL;
        }
 
-       if (!(rxmode->offloads & DEV_RX_OFFLOAD_CRC_STRIP)) {
+       /* KEEP_CRC offload flag is not supported by PMD
+        * can remove the below block when DEV_RX_OFFLOAD_CRC_STRIP removed
+        */
+       if (rte_eth_dev_must_keep_crc(rxmode->offloads)) {
                PMD_INIT_LOG(NOTICE, "can't disable hw crc strip");
                rxmode->offloads |= DEV_RX_OFFLOAD_CRC_STRIP;
        }