From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 62A56EE33 for ; Fri, 18 May 2018 16:40:12 +0200 (CEST) Received: from nis-sj1-27.broadcom.com (nis-sj1-27.lvn.broadcom.net [10.75.144.136]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 67AF230C02A for ; Fri, 18 May 2018 07:40:11 -0700 (PDT) Received: from C02VPB22HTD6.vpn.broadcom.net (unknown [10.10.118.241]) by nis-sj1-27.broadcom.com (Postfix) with ESMTP id 0661EAC070C for ; Fri, 18 May 2018 07:40:10 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Date: Fri, 18 May 2018 07:40:00 -0700 Message-Id: <20180518144001.24801-7-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.15.1 (Apple Git-101) In-Reply-To: <20180518144001.24801-1-ajit.khaparde@broadcom.com> References: <20180518144001.24801-1-ajit.khaparde@broadcom.com> Subject: [dpdk-dev] [PATCH 6/7] net/bnxt: fix xstats support for VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2018 14:40:12 -0000 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") Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/bnxt/bnxt_hwrm.c | 3 --- drivers/net/bnxt/bnxt_stats.c | 5 ----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 62e02aa8a..6e56bfd36 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3160,7 +3160,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev) 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 ba4ef1676..d6fdc1b88 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 0797896a6..bbd4e78b7 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); -- 2.15.1 (Apple Git-101)