Skip to contentSkip to conversation

net: lantiq_xrx200: fix statistics of received bytes

PATCH Applied Aleksander Jan Bajkowski 2 participants 2 messages Dec 27, 2021 – Dec 28, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: lantiq_xrx200: fix statistics of received bytes

Received frames have FCS truncated. There is no need to subtract FCS length from the statistics.

Fixes fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
---
 drivers/net/ethernet/lantiq_xrx200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/lantiq_xrx200.c +1 -1
index 96bd6f2b21ed..80bfaf2fec92 100644
@@ -224,7 +224,7 @@ static int xrx200_hw_receive(struct xrx200_chan *ch)
 	skb->protocol = eth_type_trans(skb, net_dev);
 	netif_receive_skb(skb);
 	net_dev->stats.rx_packets++;
-	net_dev->stats.rx_bytes += len - ETH_FCS_LEN;
+	net_dev->stats.rx_bytes += len;
 
 	return 0;
 }
Signature · 1 line
2.30.2
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Mon, 27 Dec 2021 17:22:03 +0100 you wrote:

Received frames have FCS truncated. There is no need to subtract FCS length from the statistics.

Fixes fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
---
 drivers/net/ethernet/lantiq_xrx200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [net] net: lantiq_xrx200: fix statistics of received bytes

    https://git.kernel.org/netdev/net/c/5be60a945329

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html