[PATCH] net/af_packet: fix statistics

Stephen Hemminger stephen at networkplumber.org
Wed May 1 18:42:08 CEST 2024


On Wed, 1 May 2024 17:25:59 +0100
Ferruh Yigit <ferruh.yigit at amd.com> wrote:

> On 4/30/2024 4:39 PM, Stephen Hemminger wrote:
> > The statistics in af_packet driver do not follow the standard
> > practice of other drivers:
> > 
> >  - Statistics should be maintained as 64 bit even on 32 bit.
> >   
> 
> ack
> 
> >  - Remove the tx_error counter since it was not correct.
> >    When transmit ring is full it is not an error and
> >    the driver correctly returns only the number sent.
> >   
> 
> nack
> Transmit full is not only return case here.
> There are actual errors continue to process relying this error calculation.
> Also there are error cases like interface down.
> Those error cases should be handled individually if we remove this.
> I suggest split this change to separate patch.

It is possible to get errors, but the code wasn't looking for those.
See packet(7) man page.


More information about the dev mailing list