From: sashiko-bot@kernel.org
To: "Björn Töpel" <bjorn@kernel.org>, bpf@vger.kernel.org
Cc: intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH net v4 1/5] libeth: xdp: Count completed XDP_TX buffers up
Date: Sat, 05 Dec 2026 14:21:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-251620@kernel.org> (raw)
In-Reply-To: <20261204142030.626820-2-bjorn@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] libeth: xdp: Fixes trailer cites idpf user instead of
introducing commit
--
commit 030e6e7c99b2e23af9fccfaae5698263d3fe1e21
Author: Björn Töpel <bjorn@kernel.org>
> libeth: xdp: Count completed XDP_TX buffers up
>
> libeth adds the buffers it sends on an XDPSQ to the driver's in-flight
> XDP_TX count. On completion, libeth counts them in struct
> libeth_cq_pp, whose kernel-doc calls it the number processed, and idpf
> subtracts that number. Currently libeth counts down from 0, so the
> subtraction adds, and the count grows by two per buffer.
>
> idpf reads the count only on its XSk queues. At 0 it completes all
> done descriptors as XSk xmit frames at once. After the first XDP_TX
> buffer the count never gets back to 0, and every completion takes the
> slow path. After about 2^31 buffers the count wraps. If it lands on 0
> while XDP_TX buffers are in flight, idpf completes them as XSk xmit
> frames. Their buffers are never freed, and userspace gets completions
> for xmit descriptors that are still in flight.
>
> Count the completed buffers up, as the kernel-doc says, and say
> buffers there, not frames.
>
> Found by an AI code review agent in review of this series. Not
> triggered at runtime.
>
> Fixes: 8ff6d62261a3 ("idpf: implement XSk xmit")
> Signed-off-by: Björn Töpel <bjorn@kernel.org>
[Severity: Low]
Should the Fixes: tag point to the libeth commit that introduced the
inverted cp->xdp_tx -= sqe->nr_frags arithmetic in
__libeth_xdp_complete_tx() and struct libeth_cq_pp::xdp_tx?
Commit 8ff6d62261a3 ("idpf: implement XSk xmit") did not modify
include/net/libeth/ and only exposed the bug when reading xdpsq->xdp_tx
in idpf_xsksq_complete().
Fixes: 26ce8eb0bb7d ("libeth: xdp: add XDPSQE completion helpers")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142030.626820-1-bjorn@kernel.org?part=1
next prev parent reply other threads:[~2026-12-05 14:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 14:20 [PATCH net v4 0/5] xsk: Keep the shared info of zero-copy buffers in kernel memory Björn Töpel
2026-12-04 14:20 ` [PATCH net v4 1/5] libeth: xdp: Count completed XDP_TX buffers up Björn Töpel
2026-12-05 14:21 ` sashiko-bot [this message]
2026-12-05 15:17 ` netdev-bot+sashiko
2026-12-04 14:20 ` [PATCH net v4 2/5] libeth: xsk: Count each XDP_TX buffer on its own Björn Töpel
2026-12-04 14:20 ` [PATCH net v4 3/5] xdp: Size zero-copy skbs from the data, not the frame size Björn Töpel
2026-12-04 14:20 ` [PATCH net v4 4/5] intel: Copy the exact length of XSk packets to skbs Björn Töpel
2026-12-04 14:20 ` [PATCH net v4 5/5] xsk: Keep the shared info of zero-copy buffers in kernel memory Björn Töpel
2026-12-05 14:21 ` sashiko-bot
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=sashiko-outbox-251620@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.