net/af_packet: remove timestamp from packet status
[dpdk.git] / drivers / net / cnxk / cnxk_ethdev.c
index 7adab46..7152dcd 100644 (file)
@@ -1096,6 +1096,7 @@ cnxk_nix_dev_stop(struct rte_eth_dev *eth_dev)
        struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);
        const struct eth_dev_ops *dev_ops = eth_dev->dev_ops;
        struct rte_mbuf *rx_pkts[32];
+       struct rte_eth_link link;
        int count, i, j, rc;
        void *rxq;
 
@@ -1128,6 +1129,10 @@ cnxk_nix_dev_stop(struct rte_eth_dev *eth_dev)
        for (i = 0; i < eth_dev->data->nb_tx_queues; i++)
                dev_ops->tx_queue_stop(eth_dev, i);
 
+       /* Bring down link status internally */
+       memset(&link, 0, sizeof(link));
+       rte_eth_linkstatus_set(eth_dev, &link);
+
        return 0;
 }
 
@@ -1309,6 +1314,10 @@ cnxk_eth_dev_init(struct rte_eth_dev *eth_dev)
        /* Register up msg callbacks */
        roc_nix_mac_link_cb_register(nix, cnxk_eth_dev_link_status_cb);
 
+       /* Register up msg callbacks */
+       roc_nix_mac_link_info_get_cb_register(nix,
+                                             cnxk_eth_dev_link_status_get_cb);
+
        dev->eth_dev = eth_dev;
        dev->configured = 0;
        dev->ptype_disable = 0;
@@ -1410,6 +1419,11 @@ cnxk_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool reset)
        /* Disable link status events */
        roc_nix_mac_link_event_start_stop(nix, false);
 
+       /* Unregister the link update op, this is required to stop VFs from
+        * receiving link status updates on exit path.
+        */
+       roc_nix_mac_link_cb_unregister(nix);
+
        /* Free up SQs */
        for (i = 0; i < eth_dev->data->nb_tx_queues; i++) {
                dev_ops->tx_queue_release(eth_dev->data->tx_queues[i]);