patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Zhou, JunX W" <junx.w.zhou@intel.com>
To: "Zhang, AlvinX" <alvinx.zhang@intel.com>,
	"Guo, Jia" <jia.guo@intel.com>,
	 "Xing, Beilei" <beilei.xing@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Zhang, AlvinX" <alvinx.zhang@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics
Date: Fri, 18 Dec 2020 07:17:59 +0000	[thread overview]
Message-ID: <cb3fc8ce1f764910a91d8c1468aae044@intel.com> (raw)
In-Reply-To: <20201215095059.22420-1-alvinx.zhang@intel.com>

Tested-by: Zhou, Jun <junx.w.zhou@intel.com> 

-----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 <jia.guo@intel.com>; Xing, Beilei <beilei.xing@intel.com>
Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>; stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics

From: Alvin Zhang <alvinx.zhang@intel.com>

Update the Rx-bytes statistics by subtract CRC bytes count from original bytes count.

Fixes: bd7883c07d4a ("net/i40e: refactor some stats related functions")
Cc: stable@dpdk.org

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 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_ethdev_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_device *pci_dev)
 		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");
--
1.8.3.1


  reply	other threads:[~2020-12-18  7:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15  9:50 [dpdk-stable] " Zhang,Alvin
2020-12-18  7:17 ` Zhou, JunX W [this message]
2020-12-23 10:59 ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb3fc8ce1f764910a91d8c1468aae044@intel.com \
    --to=junx.w.zhou@intel.com \
    --cc=alvinx.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jia.guo@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).