From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 0D85BB3D6 for ; Fri, 12 Jun 2015 09:06:44 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 12 Jun 2015 00:06:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,600,1427785200"; d="scan'208";a="741978046" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 12 Jun 2015 00:06:43 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t5C76fx1023104; Fri, 12 Jun 2015 15:06:41 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t5C76csj011241; Fri, 12 Jun 2015 15:06:40 +0800 Received: (from jingche2@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t5C76caJ011237; Fri, 12 Jun 2015 15:06:38 +0800 From: "Chen Jing D(Mark)" To: dev@dpdk.org Date: Fri, 12 Jun 2015 15:06:29 +0800 Message-Id: <1434092789-11186-4-git-send-email-jing.d.chen@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1434092789-11186-1-git-send-email-jing.d.chen@intel.com> References: <1433494978-6708-2-git-send-email-jing.d.chen@intel.com> <1434092789-11186-1-git-send-email-jing.d.chen@intel.com> Cc: shaopeng.he@intel.com Subject: [dpdk-dev] [PATCH v2 3/3] fm10k: Fix improper max queue number for VF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 07:06:45 -0000 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 714648b..f7ea7c9 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -835,7 +835,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