drivers/net: remove queue xstats auto-fill flag
authorAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Tue, 28 Sep 2021 16:48:54 +0000 (19:48 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 14 Oct 2021 22:17:44 +0000 (00:17 +0200)
Some drivers do not provide per-queue statistics. So, there is no point
to have these misleading zeros in xstats.

Fixes: f30e69b41f94 ("ethdev: add device flag to bypass auto-filled queue xstats")
Cc: stable@dpdk.org
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
16 files changed:
drivers/net/bnx2x/bnx2x_ethdev.c
drivers/net/dpaa/dpaa_ethdev.c
drivers/net/e1000/em_ethdev.c
drivers/net/e1000/igb_ethdev.c
drivers/net/enetc/enetc_ethdev.c
drivers/net/enic/enic_ethdev.c
drivers/net/enic/enic_vf_representor.c
drivers/net/i40e/i40e_ethdev.c
drivers/net/i40e/i40e_vf_representor.c
drivers/net/iavf/iavf_ethdev.c
drivers/net/ice/ice_dcf_ethdev.c
drivers/net/liquidio/lio_ethdev.c
drivers/net/mvneta/mvneta_ethdev.c
drivers/net/octeontx/octeontx_ethdev.c
drivers/net/pfe/pfe_ethdev.c
drivers/net/sfc/sfc_ethdev.c

index 463886f..8b08060 100644 (file)
@@ -648,7 +648,6 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
        }
 
        rte_eth_copy_pci_info(eth_dev, pci_dev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        sc->pcie_bus    = pci_dev->addr.bus;
        sc->pcie_device = pci_dev->addr.devid;
index c087ce6..840257c 100644 (file)
@@ -2218,8 +2218,6 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv,
        if (dpaa_drv->drv_flags & RTE_DPAA_DRV_INTR_LSC)
                eth_dev->data->dev_flags |= RTE_ETH_DEV_INTR_LSC;
 
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
        /* Invoke PMD device initialization function */
        diag = dpaa_dev_init(eth_dev);
        if (diag == 0) {
index 9e157e4..5a3af0d 100644 (file)
@@ -264,7 +264,6 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
        }
 
        rte_eth_copy_pci_info(eth_dev, pci_dev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;
        hw->device_id = pci_dev->id.device_id;
index 4152406..194da6b 100644 (file)
@@ -742,7 +742,6 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
        }
 
        rte_eth_copy_pci_info(eth_dev, pci_dev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        hw->hw_addr= (void *)pci_dev->mem_resource[0].addr;
 
@@ -936,7 +935,6 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 
        pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
        rte_eth_copy_pci_info(eth_dev, pci_dev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        hw->device_id = pci_dev->id.device_id;
        hw->vendor_id = pci_dev->id.vendor_id;
index 246aff4..784ed39 100644 (file)
@@ -889,8 +889,6 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
        eth_dev->rx_pkt_burst = &enetc_recv_pkts;
        eth_dev->tx_pkt_burst = &enetc_xmit_pkts;
 
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
        /* Retrieving and storing the HW base address of device */
        hw->hw.reg = (void *)pci_dev->mem_resource[0].addr;
        hw->device_id = pci_dev->id.device_id;
index b94332c..a1a5324 100644 (file)
@@ -1264,7 +1264,6 @@ static int eth_enic_dev_init(struct rte_eth_dev *eth_dev,
 
        pdev = RTE_ETH_DEV_TO_PCI(eth_dev);
        rte_eth_copy_pci_info(eth_dev, pdev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
        enic->pdev = pdev;
        addr = &pdev->addr;
 
index 1a44118..1ad6ad3 100644 (file)
@@ -663,8 +663,7 @@ int enic_vf_representor_init(struct rte_eth_dev *eth_dev, void *init_params)
 
        eth_dev->device->driver = pf->rte_dev->device->driver;
        eth_dev->dev_ops = &enic_vf_representor_dev_ops;
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
-                                       RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+       eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
        eth_dev->data->representor_id = vf->vf_id;
        eth_dev->data->backer_port_id = pf->port_id;
        eth_dev->data->mac_addrs = rte_zmalloc("enic_mac_addr_vf",
index 5037a55..cd723f1 100644 (file)
@@ -1443,7 +1443,6 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
        intr_handle = &pci_dev->intr_handle;
 
        rte_eth_copy_pci_info(dev, pci_dev);
-       dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        pf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
        pf->dev_data = dev->data;
index d65b821..12d5a2e 100644 (file)
@@ -511,8 +511,7 @@ i40e_vf_representor_init(struct rte_eth_dev *ethdev, void *init_params)
                return -ENODEV;
        }
 
-       ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
-                                       RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
+       ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
        ethdev->data->representor_id = representor->vf_id;
        ethdev->data->backer_port_id = pf->dev_data->port_id;
 
index 7e4d256..1842804 100644 (file)
@@ -2343,7 +2343,6 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
                return 0;
        }
        rte_eth_copy_pci_info(eth_dev, pci_dev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        hw->vendor_id = pci_dev->id.vendor_id;
        hw->device_id = pci_dev->id.device_id;
index 91f6558..f9be437 100644 (file)
@@ -1092,8 +1092,6 @@ ice_dcf_dev_init(struct rte_eth_dev *eth_dev)
        if (rte_eal_process_type() != RTE_PROC_PRIMARY)
                return 0;
 
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
        adapter->real_hw.vc_event_msg_cb = ice_dcf_handle_pf_event_msg;
        if (ice_dcf_init_hw(eth_dev, &adapter->real_hw) != 0) {
                PMD_INIT_LOG(ERR, "Failed to init DCF hardware");
index dbdab18..41b3f63 100644 (file)
@@ -2098,7 +2098,6 @@ lio_eth_dev_init(struct rte_eth_dev *eth_dev)
                return 0;
 
        rte_eth_copy_pci_info(eth_dev, pdev);
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        if (pdev->mem_resource[0].addr) {
                lio_dev->hw_addr = pdev->mem_resource[0].addr;
index f51bc22..90f2466 100644 (file)
@@ -840,7 +840,6 @@ mvneta_eth_dev_create(struct rte_vdev_device *vdev, const char *name)
        eth_dev->rx_pkt_burst = mvneta_rx_pkt_burst;
        mvneta_set_tx_function(eth_dev);
        eth_dev->dev_ops = &mvneta_ops;
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        rte_eth_dev_probing_finish(eth_dev);
        return 0;
index 7c91494..096b5f6 100644 (file)
@@ -1372,7 +1372,6 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev,
        data->promiscuous = 0;
        data->all_multicast = 0;
        data->scattered_rx = 0;
-       data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
 
        /* Get maximum number of supported MAC entries */
        max_entries = octeontx_bgx_port_mac_entries_get(nic->port_id);
index 4c7f568..d6a6944 100644 (file)
@@ -836,8 +836,6 @@ pfe_eth_init(struct rte_vdev_device *vdev, struct pfe *pfe, int id)
        eth_dev->data->nb_rx_queues = 1;
        eth_dev->data->nb_tx_queues = 1;
 
-       eth_dev->data->dev_flags |= RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
-
        /* For link status, open the PFE CDEV; Error from this function
         * is silently ignored; In case of error, the link status will not
         * be available.
index 9195694..8ec56a9 100644 (file)
@@ -2793,7 +2793,6 @@ sfc_eth_dev_init(struct rte_eth_dev *dev, void *init_params)
 
        /* 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;
        dev->data->dev_flags |= RTE_ETH_DEV_FLOW_OPS_THREAD_SAFE;
 
        rc = sfc_kvargs_parse(sa);