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 5B4BFA0471 for ; Wed, 17 Jul 2019 06:55:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C27294D27; Wed, 17 Jul 2019 06:55:47 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 305222BF4 for ; Wed, 17 Jul 2019 06:55:46 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id u14so10216348pfn.2 for ; Tue, 16 Jul 2019 21:55:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k84xttVfcAp/cL95uSNB+7UCPxvUQPe/lU2gGlUz2W8=; b=T7hPNiUSxDxUHOFTeuI+pHONYsFW7LqRr+FXHvmkMXq86TomJambuWvD6oICSQ47iT c2hd42JcSs0CNltoEq3bGFMLtrn4NtOBCAtWbUoM55O11P701vYveWZG1es/Quw5h0VI eLIE7XpZ+CqZt7hTektY72qjXdMpv/jEsdu6nKOQVTL1qxp+RI7VlzoambiSt9mfoXHW BPebx6FBS9LULRKhAW0KpWKO3obSz9KZJB7pDRxdN0+oiFOii1Tj9qyLa4kgY5jgTpJw 8E1Gb5d64qm16PGN/DRqlzHf33lnJINI92wDr9fHF9XBleAtzrB34Ia3j78k4dWEDvHz hEVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k84xttVfcAp/cL95uSNB+7UCPxvUQPe/lU2gGlUz2W8=; b=BhQPGVFal34+oH7+KOenxlRnYaurhgL1T1wOvXHvSDWMkstu7oP6x9/QV5qaOdYCTL wbB5G2oZ1IXfzX1c9D796e9qhgeyuzPzispht9Vp06eIQzW5mR4ewtV1CNg3Rr53dbYD pEfqRQpj+S+lO2EbGee3d2Wa6NvcSh+Yn8MWHJPVymCOnXi8I2cguwdVqIHFVUa8VH9f uzssT99WVUcCx5fcJKBxPx3fGhqiknnTVhBExnz48bKCi8o5Tu9o8ZGgsmSLuTtlFzcp Fs6AAVTLjXnp0Qu+MsXvHnz/XunyDXFMZhI3QeBB025oiYZQ3Hz/dK+ng03jGqaVY3L4 by4g== X-Gm-Message-State: APjAAAWdBzLDM4B4svXyZmzKQHpKNBHiu7NqYSkgqm768j5a5ydMy+D1 QOinPSh7PX0iE77A3nbgRUc= X-Google-Smtp-Source: APXvYqwNIAeWKM0KBedxIL1elRAjnlvEdIB8Vb19cymJT5RiVmIN+/61oxa2sZs8uTbbxRrWINY0rw== X-Received: by 2002:a63:fc52:: with SMTP id r18mr38544170pgk.378.1563339345270; Tue, 16 Jul 2019 21:55:45 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id u97sm20810473pjb.26.2019.07.16.21.55.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 21:55:45 -0700 (PDT) Date: Tue, 16 Jul 2019 21:55:37 -0700 From: Stephen Hemminger To: Qi Zhang Cc: jingjing.wu@intel.com, wenzhuo.lu@intel.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20190716215537.60762ee6@hermes.lan> In-Reply-To: <20190717043100.46092-1-qi.z.zhang@intel.com> References: <20190717043100.46092-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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. Acked-by: Stephen Hemminger