[PATCH] net/af_packet: fix statistics
Ferruh Yigit
ferruh.yigit at amd.com
Thu May 2 15:48:42 CEST 2024
On 5/1/2024 5:42 PM, Stephen Hemminger wrote:
> 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.
>
Some of the error cases are in dpdk level, so we can't just rely on
af_packet socket error counters.
More information about the dev
mailing list