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 78333A00E6 for ; Mon, 5 Aug 2019 12:52:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 27AD21BE19; Mon, 5 Aug 2019 12:52:23 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 769BF1BD52; Mon, 5 Aug 2019 12:52:21 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 22C5DA8005A; Mon, 5 Aug 2019 10:52:19 +0000 (UTC) Received: from [192.168.1.11] (85.187.13.152) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 5 Aug 2019 11:52:11 +0100 To: Stephen Hemminger , Qi Zhang , Thomas Monjalon , Ferruh Yigit CC: , , , References: <20190717043100.46092-1-qi.z.zhang@intel.com> <20190716215537.60762ee6@hermes.lan> From: Andrew Rybchenko Message-ID: <120cd9d5-117a-0de7-b6b4-25736540cc96@solarflare.com> Date: Mon, 5 Aug 2019 13:52:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190716215537.60762ee6@hermes.lan> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.152] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24822.003 X-TM-AS-Result: No-5.718000-8.000000-10 X-TMASE-MatchedRID: nVQUmLJJeyb4ECMHJTM/ufZvT2zYoYOwC/ExpXrHizzLwwwRZ45jJRLm sID9yKB4SjVIFO5E44CmcFuKGELrlqKgpS1QMZdlPwKTD1v8YV4j3JVwc0NTtrlmMfLNiukaBOp /8ODZzPw68iOMqmKOPr5LRoVay7SyWdttaBupUyD1WO1NzV/CYH0tCKdnhB58vqq8s2MNhPCy5/ tFZu9S3Ku6xVHLhqfxJ0RPnyOnrZItSj9TZCmw0xf9YYei9skq55mZJ7EvP7OuOZNLLRFiINGIk 5Z43jgIt4YUvhZ3cL5yjXYMIry2nZTEzh1EygpkSOH4ZDOs9QPwHX5+Q8jjw1wuriZ3P6dErIJZ JbQfMXRqaM5LmpUkwzr8RUm73lTc X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.718000-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24822.003 X-MDID: 1565002340-vXf5ay1exvcs Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix Rx bytes stats 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" On 7/17/19 7:55 AM, Stephen Hemminger wrote: > On Wed, 17 Jul 2019 12:31:00 +0800 > Qi Zhang wrote: > >> Exclude 4 bytes CRC for rx bytes stats. >> This also aligned Rx stats calculation with PF. >> >> Fixes: f4a41a6953af ("net/avf: support stats") >> Cc: stable@dpdk.org >> >> Signed-off-by: Qi Zhang >> --- >> drivers/net/iavf/iavf_ethdev.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c >> index 53dc05c78..fe75e86ab 100644 >> --- a/drivers/net/iavf/iavf_ethdev.c >> +++ b/drivers/net/iavf/iavf_ethdev.c >> @@ -1047,6 +1047,7 @@ iavf_dev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats) >> stats->imissed = pstats->rx_discards; >> stats->oerrors = pstats->tx_errors + pstats->tx_discards; >> stats->ibytes = pstats->rx_bytes; >> + stats->ibytes -= stats->ipackets * RTE_ETHER_CRC_LEN; >> stats->obytes = pstats->tx_bytes; >> } else { >> PMD_DRV_LOG(ERR, "Get statistics failed"); > Correct, DPDK statistics should not include CRC. Stephen, Thomas, Ferruh, is it documented somewhere? May be we should update fields description and rte_eth_stats_get() which mentions these fields as well to highlight it? Thanks, Andrew.