From patchwork Mon Nov 14 06:14:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Remy Horton X-Patchwork-Id: 17009 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id DAADD374D; Mon, 14 Nov 2016 07:15:03 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 74CFBF72 for ; Mon, 14 Nov 2016 07:14:53 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 13 Nov 2016 22:14:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,488,1473145200"; d="scan'208";a="901066259" Received: from rhorton-mobl.ger.corp.intel.com (HELO VM.sh.intel.com) ([10.239.204.180]) by orsmga003.jf.intel.com with ESMTP; 13 Nov 2016 22:14:52 -0800 From: Remy Horton To: dev@dpdk.org Cc: Helin Zhang , Jingjing Wu Date: Mon, 14 Nov 2016 14:14:48 +0800 Message-Id: <1479104089-27862-2-git-send-email-remy.horton@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1479104089-27862-1-git-send-email-remy.horton@intel.com> References: <1479104089-27862-1-git-send-email-remy.horton@intel.com> Subject: [dpdk-dev] [PATCH v1 1/2] net/i40e: fix incorrect xstats value mapping 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The offsets used in rte_i40evf_stats_strings for transmission statistics were wrong, returning the total byte count rather than the respective (unicast, multicast, broadcast, drop, & error) packet counts. Fixes: da61cd084976 ("i40evf: add extended stats") Signed-off-by: Remy Horton Acked-by: Kevin Traynor --- drivers/net/i40e/i40e_ethdev_vf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index aa306d6..afae2ec 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -176,11 +176,11 @@ static const struct rte_i40evf_xstats_name_off rte_i40evf_stats_strings[] = { {"rx_unknown_protocol_packets", offsetof(struct i40e_eth_stats, rx_unknown_protocol)}, {"tx_bytes", offsetof(struct i40e_eth_stats, tx_bytes)}, - {"tx_unicast_packets", offsetof(struct i40e_eth_stats, tx_bytes)}, - {"tx_multicast_packets", offsetof(struct i40e_eth_stats, tx_bytes)}, - {"tx_broadcast_packets", offsetof(struct i40e_eth_stats, tx_bytes)}, - {"tx_dropped_packets", offsetof(struct i40e_eth_stats, tx_bytes)}, - {"tx_error_packets", offsetof(struct i40e_eth_stats, tx_bytes)}, + {"tx_unicast_packets", offsetof(struct i40e_eth_stats, tx_unicast)}, + {"tx_multicast_packets", offsetof(struct i40e_eth_stats, tx_multicast)}, + {"tx_broadcast_packets", offsetof(struct i40e_eth_stats, tx_broadcast)}, + {"tx_dropped_packets", offsetof(struct i40e_eth_stats, tx_discards)}, + {"tx_error_packets", offsetof(struct i40e_eth_stats, tx_errors)}, }; #define I40EVF_NB_XSTATS (sizeof(rte_i40evf_stats_strings) / \