crypto/qat: fix message for NULL algo setting unused counter
[dpdk.git] / drivers / net / cxgbe / cxgbevf_ethdev.c
index b4770e0..a6458d5 100644 (file)
@@ -50,6 +50,7 @@ static int cxgbevf_dev_stats_get(struct rte_eth_dev *eth_dev,
        /* TX Stats */
        eth_stats->opackets = ps.tx_bcast_frames + ps.tx_mcast_frames +
                              ps.tx_ucast_frames;
+       eth_stats->obytes = ps.tx_octets;
        eth_stats->oerrors  = ps.tx_drop;
 
        for (i = 0; i < pi->n_rx_qsets; i++) {
@@ -176,6 +177,16 @@ out_free_adapter:
        return err;
 }
 
+static int eth_cxgbevf_dev_uninit(struct rte_eth_dev *eth_dev)
+{
+       struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private);
+       struct adapter *adap = pi->adapter;
+
+       /* Free up other ports and all resources */
+       cxgbe_close(adap);
+       return 0;
+}
+
 static int eth_cxgbevf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
                                 struct rte_pci_device *pci_dev)
 {
@@ -185,7 +196,7 @@ static int eth_cxgbevf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 
 static int eth_cxgbevf_pci_remove(struct rte_pci_device *pci_dev)
 {
-       return rte_eth_dev_pci_generic_remove(pci_dev, NULL);
+       return rte_eth_dev_pci_generic_remove(pci_dev, eth_cxgbevf_dev_uninit);
 }
 
 static struct rte_pci_driver rte_cxgbevf_pmd = {