diff options
| author | 2026-10-04 09:59:30 +0300 | |
|---|---|---|
| committer | 2026-10-07 16:45:57 -0700 | |
| commit | f9d58127380a5370b207279a215ff1d8ce37a018 (patch) | |
| tree | 62dd24226d76ccd35b0a69808dbe6e671688791d /scripts/Makefile.thinlto | |
| parent | sfc: handle rhashtable walk errors in mport lookup (diff) | |
net: axienet: do not report TX completions as NAPI work
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.
Signed-off-by: Sagi Maimon <maimon.sagi@gmail.com>
Reviewed-by: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261004065930.1004953-1-maimon.sagi@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
