From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen Jing D(Mark)" Subject: [PATCH 3/3] fm10k: Fix improper max queue number for VF Date: Fri, 5 Jun 2015 17:02:58 +0800 Message-ID: <1433494978-6708-4-git-send-email-jing.d.chen@intel.com> References: <1433494978-6708-1-git-send-email-jing.d.chen@intel.com> Cc: shaopeng.he@intel.com To: dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B3E6CC32E for ; Fri, 5 Jun 2015 11:03:17 +0200 (CEST) In-Reply-To: <1433494978-6708-1-git-send-email-jing.d.chen@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: "Chen Jing D(Mark)" Both PF and VF shared code in function fm10k_stats_get(). The function works well with PF, but has problem with VF since VF has less queues than PF. Signed-off-by: Chen Jing D(Mark) --- drivers/net/fm10k/fm10k_ethdev.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 3792df6..2c819e5 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -829,7 +829,7 @@ fm10k_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) ipackets = opackets = ibytes = obytes = 0; for (i = 0; (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) && - (i < FM10K_MAX_QUEUES_PF); ++i) { + (i < hw->mac.max_queues); ++i) { stats->q_ipackets[i] = hw_stats->q[i].rx_packets.count; stats->q_opackets[i] = hw_stats->q[i].tx_packets.count; stats->q_ibytes[i] = hw_stats->q[i].rx_bytes.count; -- 1.7.7.6