From patchwork Thu Feb 1 02:11:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanglong Wu X-Patchwork-Id: 34801 X-Patchwork-Delegate: helin.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 203721B897; Thu, 1 Feb 2018 03:13:45 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DE4C21B895 for ; Thu, 1 Feb 2018 03:13:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2018 18:13:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,442,1511856000"; d="scan'208";a="197752505" Received: from wuyanglong.sh.intel.com ([10.67.110.174]) by orsmga005.jf.intel.com with ESMTP; 31 Jan 2018 18:13:40 -0800 From: Yanglong Wu To: dev@dpdk.org Cc: qi.z.zhang@intel.com, wenzhuo.lu@intel.com, Yanglong Wu Date: Thu, 1 Feb 2018 10:11:28 +0800 Message-Id: <20180201021128.174110-1-yanglong.wu@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH] net/i40e:fix VSI stats error 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In VF, the number of ibytes read from register have been stripped out CRC already, but in stats, it subtracts CRC bytes again. So it lead to RX bytes is smaller than TX bytes. Fixes: 98abce23(fix VF statistics) Signed-off-by: Yanglong Wu Reviewed-by: Kirill Rybalchenko --- drivers/net/i40e/i40e_ethdev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index c4df65df0..84e82889a 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2440,10 +2440,6 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi) i40e_stat_update_48(hw, I40E_GLV_BPRCH(idx), I40E_GLV_BPRCL(idx), vsi->offset_loaded, &oes->rx_broadcast, &nes->rx_broadcast); - /* exclude CRC bytes */ - nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast + - nes->rx_broadcast) * ETHER_CRC_LEN; - i40e_stat_update_32(hw, I40E_GLV_RDPC(idx), vsi->offset_loaded, &oes->rx_discards, &nes->rx_discards); /* GLV_REPC not supported */