DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics
@ 2020-12-15  9:50 Zhang,Alvin
  2020-12-18  7:17 ` Zhou, JunX W
  2020-12-23 10:59 ` Zhang, Qi Z
  0 siblings, 2 replies; 3+ messages in thread
From: Zhang,Alvin @ 2020-12-15  9:50 UTC (permalink / raw)
  To: jia.guo, beilei.xing; +Cc: dev, Alvin Zhang, stable

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics
  2020-12-15  9:50 [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics Zhang,Alvin
@ 2020-12-18  7:17 ` Zhou, JunX W
  2020-12-23 10:59 ` Zhang, Qi Z
  1 sibling, 0 replies; 3+ messages in thread
From: Zhou, JunX W @ 2020-12-18  7:17 UTC (permalink / raw)
  To: Zhang, AlvinX, Guo, Jia, Xing, Beilei; +Cc: dev, Zhang, AlvinX, stable

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics
  2020-12-15  9:50 [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics Zhang,Alvin
  2020-12-18  7:17 ` Zhou, JunX W
@ 2020-12-23 10:59 ` Zhang, Qi Z
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2020-12-23 10:59 UTC (permalink / raw)
  To: Zhang, AlvinX, Guo, Jia, Xing, Beilei; +Cc: dev, Zhang, AlvinX, stable



> -----Original Message-----
> From: dev <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>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-23 10:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15  9:50 [dpdk-dev] [PATCH] net/i40e: fix Rx-bytes statistics Zhang,Alvin
2020-12-18  7:17 ` Zhou, JunX W
2020-12-23 10:59 ` Zhang, Qi Z

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git