From: Yanglong Wu Subject: [PATCH] net/i40e:fix VSI stats error Date: Thu, 1 Feb 2018 10:11:28 +0800 Message-ID: <20180201021128.174110-1-yanglong.wu@intel.com> Cc: qi.z.zhang@intel.com, wenzhuo.lu@intel.com, Yanglong Wu To: dev@dpdk.org Return-path: 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) 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 --- 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 */ -- 2.11.0