All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/i40e:fix VSI stats error
@ 2018-02-01  2:11 Yanglong Wu
  2018-03-14 11:59 ` Rybalchenko, Kirill
  0 siblings, 1 reply; 3+ messages in thread
From: Yanglong Wu @ 2018-02-01  2:11 UTC (permalink / raw)
  To: dev; +Cc: qi.z.zhang, wenzhuo.lu, Yanglong Wu

In VF, the number of ibytes read from register
have been stripped out CRC already, but in stats, it
subtracts CRC bytes again. So it lead to RX
bytes is smaller than TX bytes.

Fixes: 98abce23(fix VF statistics)
Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index c4df65df0..84e82889a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -2440,10 +2440,6 @@ i40e_update_vsi_stats(struct i40e_vsi *vsi)
 	i40e_stat_update_48(hw, I40E_GLV_BPRCH(idx), I40E_GLV_BPRCL(idx),
 			    vsi->offset_loaded, &oes->rx_broadcast,
 			    &nes->rx_broadcast);
-	/* exclude CRC bytes */
-	nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast +
-		nes->rx_broadcast) * ETHER_CRC_LEN;
-
 	i40e_stat_update_32(hw, I40E_GLV_RDPC(idx), vsi->offset_loaded,
 			    &oes->rx_discards, &nes->rx_discards);
 	/* GLV_REPC not supported */
-- 
2.11.0

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

end of thread, other threads:[~2018-03-14 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-01  2:11 [PATCH] net/i40e:fix VSI stats error Yanglong Wu
2018-03-14 11:59 ` Rybalchenko, Kirill
2018-03-14 12:58   ` Zhang, Qi Z

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.