examples/ipsec-secgw: fix session mempool initialisation
[dpdk.git] / drivers / net / sfc / sfc_ethdev.c
index 165776b..c067208 100644 (file)
@@ -276,7 +276,7 @@ sfc_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete)
        return ret;
 }
 
-static void
+static int
 sfc_dev_stop(struct rte_eth_dev *dev)
 {
        struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev);
@@ -288,6 +288,8 @@ sfc_dev_stop(struct rte_eth_dev *dev)
        sfc_adapter_unlock(sa);
 
        sfc_log_init(sa, "done");
+
+       return 0;
 }
 
 static int
@@ -324,11 +326,7 @@ static void
 sfc_eth_dev_secondary_clear_ops(struct rte_eth_dev *dev)
 {
        free(dev->process_private);
-       dev->process_private = NULL;
-       dev->dev_ops = NULL;
-       dev->tx_pkt_prepare = NULL;
-       dev->tx_pkt_burst = NULL;
-       dev->rx_pkt_burst = NULL;
+       rte_eth_dev_release_port(dev);
 }
 
 static int
@@ -380,7 +378,6 @@ sfc_dev_close(struct rte_eth_dev *dev)
        /* Required for logging, so cleanup last */
        sa->eth_dev = NULL;
 
-       dev->process_private = NULL;
        free(sa);
 
        return 0;
@@ -2220,6 +2217,7 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 
        /* Copy PCI device info to the dev->data */
        rte_eth_copy_pci_info(dev, pci_dev);
+       dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        rc = sfc_kvargs_parse(sa);
        if (rc != 0)