From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2ADA8A09F7 for ; Fri, 18 Dec 2020 08:18:11 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE4BCCA48; Fri, 18 Dec 2020 08:18:09 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 4C1CECA28; Fri, 18 Dec 2020 08:18:04 +0100 (CET) IronPort-SDR: Pb8iwh/rGV3qcCGa4tWpOpyAsci6GOR8ODk1UIqbjasr9S2Jp2dsISD74Zz0Vh5ltjFs+hJ6Ma s79AfUFxJ2dQ== X-IronPort-AV: E=McAfee;i="6000,8403,9838"; a="155197603" X-IronPort-AV: E=Sophos;i="5.78,429,1599548400"; d="scan'208";a="155197603" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Dec 2020 23:18:03 -0800 IronPort-SDR: ZzDtWHe5nEpgyUyYdBPYPc4hox96+MbJYVisxF1K35WRM282aPii0v5Z3PTQJLzo/n+qX5gVYE IGrFQrYCyBWA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,429,1599548400"; d="scan'208";a="353820566" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga002.jf.intel.com with ESMTP; 17 Dec 2020 23:18:02 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 17 Dec 2020 23:18:01 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX603.ccr.corp.intel.com (10.109.6.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 18 Dec 2020 15:17:59 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.1713.004; Fri, 18 Dec 2020 15:17:59 +0800 From: "Zhou, JunX W" To: "Zhang, AlvinX" , "Guo, Jia" , "Xing, Beilei" CC: "dev@dpdk.org" , "Zhang, AlvinX" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics Thread-Index: AQHW0sgZTv6TwPfPFU6K7rCiaYbsBan8dj1g Date: Fri, 18 Dec 2020 07:17:59 +0000 Message-ID: References: <20201215095059.22420-1-alvinx.zhang@intel.com> In-Reply-To: <20201215095059.22420-1-alvinx.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Tested-by: Zhou, Jun =20 -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhang,Alvin Sent: Tuesday, December 15, 2020 5:51 PM To: Guo, Jia ; Xing, Beilei Cc: dev@dpdk.org; Zhang, AlvinX ; stable@dpdk.org Subject: [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics From: Alvin Zhang Update the Rx-bytes statistics by subtract CRC bytes count from original by= tes count. Fixes: bd7883c07d4a ("net/i40e: refactor some stats related functions") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/i40e/i40e_ethdev_vf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethd= ev_vf.c index c26b036..b82e782 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2406,6 +2406,7 @@ static int eth_i40evf_pci_remove(struct rte_pci_devic= e *pci_dev) stats->imissed =3D pstats->rx_discards; stats->oerrors =3D pstats->tx_errors + pstats->tx_discards; stats->ibytes =3D pstats->rx_bytes; + stats->ibytes -=3D stats->ipackets * RTE_ETHER_CRC_LEN; stats->obytes =3D pstats->tx_bytes; } else { PMD_DRV_LOG(ERR, "Get statistics failed"); -- 1.8.3.1