[PATCH net v5] net: axienet: do not report TX completions as NAPI work

Daniel Machon daniel.machon at microchip.com
Wed Oct 7 12:01:20 PDT 2026


> axienet_tx_poll() reclaims every completed TX descriptor in one pass:
> it passes lp->tx_bd_num to axienet_free_tx_chain() as the descriptor
> limit, and @budget is only used as the napi_consume_skb() bulk-free
> hint.  It then returns the number of packets reclaimed, which is bounded
> by the ring size rather than by the budget, so the poll can report more
> work than it was given.  This was seen after TX completion interrupts
> had not been taken for a while and a full ring was reclaimed at once:
> 
>   eth0: NAPI poll function axienet_tx_poll+0x0/0x180 [xilinx_emac]
>         returned 96, exceeding its budget of 64.
> 
> netpoll is affected as well.  poll_one_napi() polls with a budget of 0
> to reclaim the TX path only, and warns once if any work is reported.
> 
> TX completions are not budgeted work: Documentation/networking/napi.rst
> lets a poll process any number of them.  Do as bcmgenet does since
> commit a58cdf56b6eb ("net: bcmgenet: complete Tx NAPI after one reclaim
> pass"): reclaim the ring, complete NAPI with no work done, re-enable the
> TX completion interrupt and return 0.  Re-enabling the interrupt raises
> it straight away if more completions are already pending, so none is
> left behind.  This also drops the extra poll that used to follow a full
> budget's worth of completions, which only found an empty ring.
> 
> netpoll polls with a budget of 0 and must not complete NAPI, so skip
> the completion then; napi_complete_done() refuses it in that case
> anyway.

Reviewed-by: Daniel Machon <daniel.machon at microchip.com>




More information about the linux-arm-kernel mailing list