From: Daniel Machon <daniel.machon@microchip.com>
To: Sagi Maimon <maimon.sagi@gmail.com>
Cc: <netdev@vger.kernel.org>, <kuba@kernel.org>, <pabeni@redhat.com>,
<suraj.gupta2@amd.com>, <radhey.shyam.pandey@amd.com>,
<michal.simek@amd.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>,
<robert.hancock@calian.com>, <sean.anderson@linux.dev>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v5] net: axienet: do not report TX completions as NAPI work
Date: Wed, 7 Oct 2026 21:01:20 +0200 [thread overview]
Message-ID: <20261007190120.ne5xjp5rhvsbezjv@DEN-DL-M70577> (raw)
In-Reply-To: <20261004065930.1004953-1-maimon.sagi@gmail.com>
> 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@microchip.com>
next prev parent reply other threads:[~2026-10-07 19:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 6:59 [PATCH net v5] net: axienet: do not report TX completions as NAPI work Sagi Maimon
2026-10-04 7:04 ` netdev-bot+sinfo
2026-10-04 8:27 ` Sagi Maimon
2026-10-07 19:01 ` Daniel Machon [this message]
2026-10-07 23:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261007190120.ne5xjp5rhvsbezjv@DEN-DL-M70577 \
--to=daniel.machon@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maimon.sagi@gmail.com \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=robert.hancock@calian.com \
--cc=sean.anderson@linux.dev \
--cc=suraj.gupta2@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox