]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Fix Rx byte accounting for ndev stats
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Tue, 27 Feb 2018 15:33:10 +0000 (17:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Feb 2018 15:59:33 +0000 (10:59 -0500)
commit29de7583bd926888671975aeb9b630ff6ac8ee94
treeeaf6ebf4158f54863f66746b72d339391d326cb8
parent1a0835041b8d82ecd8b3f23cd7806768a0197763
gianfar: Fix Rx byte accounting for ndev stats

Don't include in the Rx bytecount of the packet sent up the stack:
the FCB (frame control block), and the padding bytes inserted by
the controller into the frame payload, nor the FCS. All these are
being pulled out of the skb by gfar_process_frame().
This issue is old, likely from the driver's beginnings, however
it was amplified by recent:
commit 3c7386860a98 ("gianfar: simplify FCS handling and fix memory leak")
which basically added the FCS to the Rx bytecount, and so brought
this to my attention.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c