ethdev: make default behavior CRC strip on Rx
[dpdk.git] / drivers / net / octeontx / octeontx_ethdev.c
index 21e5e4f..71843c6 100644 (file)
@@ -281,14 +281,6 @@ octeontx_dev_configure(struct rte_eth_dev *dev)
                return -EINVAL;
        }
 
-       /* 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;
-       }
-
        if (!(txmode->offloads & DEV_TX_OFFLOAD_MT_LOCKFREE)) {
                PMD_INIT_LOG(NOTICE, "cant disable lockfree tx");
                txmode->offloads |= DEV_TX_OFFLOAD_MT_LOCKFREE;
@@ -353,6 +345,9 @@ octeontx_dev_close(struct rte_eth_dev *dev)
 
                rte_free(txq);
        }
+
+       dev->tx_pkt_burst = NULL;
+       dev->rx_pkt_burst = NULL;
 }
 
 static int
@@ -446,9 +441,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev)
                             ret);
                return;
        }
-
-       dev->tx_pkt_burst = NULL;
-       dev->rx_pkt_burst = NULL;
 }
 
 static void
@@ -1015,6 +1007,8 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
                if (eth_dev == NULL)
                        return -ENODEV;
 
+               eth_dev->dev_ops = &octeontx_dev_ops;
+               eth_dev->device = &dev->device;
                eth_dev->tx_pkt_burst = octeontx_xmit_pkts;
                eth_dev->rx_pkt_burst = octeontx_recv_pkts;
                rte_eth_dev_probing_finish(eth_dev);
@@ -1183,6 +1177,7 @@ octeontx_probe(struct rte_vdev_device *dev)
                }
                /* TODO: request info from primary to set up Rx and Tx */
                eth_dev->dev_ops = &octeontx_dev_ops;
+               eth_dev->device = &dev->device;
                rte_eth_dev_probing_finish(eth_dev);
                return 0;
        }