Skip to content

Commit

Permalink
net/i40e: fix Rx bytes statistics
Browse files Browse the repository at this point in the history
[ upstream commit e8326d3 ]

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

Fixes: bd7883c ("net/i40e: refactor some stats related functions")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
Tested-by: Jun W Zhou <junx.w.zhou@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
  • Loading branch information
Alvin Zhang authored and cpaelzer committed Feb 2, 2021
1 parent be95781 commit 068c310
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/i40e/i40e_ethdev_vf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2388,6 +2388,7 @@ i40evf_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");
Expand Down

0 comments on commit 068c310

Please sign in to comment.