net/atlantic: read MAC registers for debug purposes
[dpdk.git] / drivers / net / octeontx / octeontx_ethdev.c
index 21e5e4f..5431b44 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);
@@ -1139,6 +1133,11 @@ octeontx_remove(struct rte_vdev_device *dev)
                if (eth_dev == NULL)
                        return -ENODEV;
 
+               if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
+                       rte_eth_dev_release_port_secondary(eth_dev);
+                       continue;
+               }
+
                nic = octeontx_pmd_priv(eth_dev);
                rte_event_dev_stop(nic->evdev);
                PMD_INIT_LOG(INFO, "Closing octeontx device %s", octtx_name);
@@ -1149,6 +1148,9 @@ octeontx_remove(struct rte_vdev_device *dev)
                rte_event_dev_close(nic->evdev);
        }
 
+       if (rte_eal_process_type() != RTE_PROC_PRIMARY)
+               return 0;
+
        /* Free FC resource */
        octeontx_pko_fc_free();
 
@@ -1183,6 +1185,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;
        }