[PATCH net] net: xilinx: axienet: Fix packet counting
Sean Anderson
sean.anderson at linux.dev
Thu Sep 5 07:40:03 PDT 2024
On 9/4/24 20:09, Jakub Kicinski wrote:
> On Tue, 3 Sep 2024 13:56:19 -0400 Sean Anderson wrote:
>> axienet_free_tx_chain returns the number of DMA descriptors it's
>> handled. However, axienet_tx_poll treats the return as the number of
>> packets. When scatter-gather SKBs are enabled, a single packet may use
>> multiple DMA descriptors, which causes incorrect packet counts. Fix this
>> by explicitly keepting track of the number of packets processed as
>> separate from the DMA descriptors.
>
> budget doubles up as a "are we really in NAPI" flag.
> You can't pass non-zero budget to napi_consume_skb() if not in NAPI.
Hm, maybe I should just determine this all from the "force" flag then.
--Sean
More information about the linux-arm-kernel
mailing list