summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@broadcom.com>2018-05-22 11:13:46 -0700
committerFerruh Yigit <ferruh.yigit@intel.com>2018-05-23 00:35:01 +0200
commit7f799071fe75842e9e76cef98d019c1072cfb649 (patch)
tree6d3dc3d9922e0c9ba1c6200f6d7bacae3ee935ba
parentedafb57ba4a16a58de7d33cbdce14ecf8a6cfd00 (diff)
downloaddpdk-7f799071fe75842e9e76cef98d019c1072cfb649.zip
dpdk-7f799071fe75842e9e76cef98d019c1072cfb649.tar.gz
dpdk-7f799071fe75842e9e76cef98d019c1072cfb649.tar.xz
net/bnxt: fix xstats for VF
Query of port stats is permitted for VF interfaces as well. Fix the code to allow VFs to query port stats. Fixes: bfb9c2260be2 ("net/bnxt: support xstats get/reset") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
-rw-r--r--drivers/net/bnxt/bnxt_ethdev.c2
-rw-r--r--drivers/net/bnxt/bnxt_hwrm.c3
-rw-r--r--drivers/net/bnxt/bnxt_stats.c5
3 files changed, 1 insertions, 9 deletions
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 62e02aa..6e56bfd 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -3160,7 +3160,7 @@ skip_init:
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return 0;
- if (BNXT_PF(bp) && pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
+ if (pci_dev->id.device_id != BROADCOM_DEV_ID_NS2) {
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
"bnxt_%04x:%02x:%02x:%02x-%s", pci_dev->addr.domain,
pci_dev->addr.bus, pci_dev->addr.devid,
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index ba4ef16..d6fdc1b 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3131,9 +3131,6 @@ int bnxt_hwrm_port_qstats(struct bnxt *bp)
struct bnxt_pf_info *pf = &bp->pf;
int rc;
- if (!(bp->flags & BNXT_FLAG_PORT_STATS))
- return 0;
-
HWRM_PREP(req, PORT_QSTATS);
req.port_id = rte_cpu_to_le_16(pf->port_id);
diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c
index 0797896..bbd4e78 100644
--- a/drivers/net/bnxt/bnxt_stats.c
+++ b/drivers/net/bnxt/bnxt_stats.c
@@ -266,11 +266,6 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev,
unsigned int count, i;
uint64_t tx_drop_pkts;
- if (!(bp->flags & BNXT_FLAG_PORT_STATS)) {
- PMD_DRV_LOG(ERR, "xstats not supported for VF\n");
- return 0;
- }
-
bnxt_hwrm_port_qstats(bp);
bnxt_hwrm_func_qstats_tx_drop(bp, 0xffff, &tx_drop_pkts);