From: "Björn Töpel" <bjorn@kernel.org>
To: netdev-bot+sashiko@kernel.org
Cc: magnus.karlsson@intel.com, maciej.fijalkowski@intel.com,
aleksander.lobakin@intel.com, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, willemb@google.com, andrii@kernel.org,
eddyz87@gmail.com, memxor@gmail.com, shuah@kernel.org,
netdev@vger.kernel.org, bpf@vger.kernel.org, horms@kernel.org,
sdf@fomichev.me, martin.lau@linux.dev, song@kernel.org,
yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com,
ihor.solodrai@linux.dev, anthony.l.nguyen@intel.com,
przemyslaw.kitszel@intel.com, larysa.zaremba@intel.com,
tushar.vyavahare@intel.com, kerneljasonxing@gmail.com,
bastien.curutchet@bootlin.com, colin.i.king@gmail.com,
intel-wired-lan@lists.osuosl.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net 1/3] libeth: xsk: Count each XDP_TX buffer on its own
Date: Mon, 30 Nov 2026 12:58:05 +0100 [thread overview]
Message-ID: <87cxrm1qgi.fsf@all.your.base.are.belong.to.us> (raw)
In-Reply-To: <179587888871.3135.18266598324203799547@kernel.org>
netdev-bot+sashiko@kernel.org writes:
> [Severity: Low]
> The enum doc is updated here. Should the struct libeth_sqe kernel-doc in
> the same file be updated as well? It still describes per-frame values:
Will fix.
> [Severity: High]
> Does this decrement move the in-flight count the right way once idpf
> applies it?
[...]
> Should libeth accumulate a positive count here (cp->xdp_tx++, and
> cp->xdp_tx += sqe->nr_frags above)? Or should idpf add cp.xdp_tx
> instead of subtracting it?
Correct, but it is older than this patch. Since 26ce8eb0bb7d ("libeth:
xdp: add XDPSQE completion helpers") libeth counts completed buffers
down from zero and idpf subtracts the result, so xdp_tx only grows. This
patch keeps that convention. It is not related to the shared info, so
that's a separate series.
> [Severity: Low]
> This isn't a bug introduced by this patch, but the kernel-doc for
> struct libeth_cq_pp in include/net/libeth/tx.h says:
>
> * @xdp_tx: number of XDP-not-XSk frames processed
>
> __libeth_xdp_complete_tx() actually counts buffers, and that includes
> XSk XDP_TX buffers. The old code already counted LIBETH_SQE_XSK_TX
> here. Could the wording be fixed while this code is being changed?
Ya, but with the separate fix above.
> [Severity: High]
> This is a pre-existing issue and was not introduced by this patch. It
> is in the same XSk XDP_TX path: does libeth_xsk_tx_queue_bulk() in this
> file handle a flush failure in the middle of a frame correctly?
[...]
> This goes back to b3ad8450b4dc, and 90e5d84086d9 only covered the
> success exit. Would it help to free the popped frag (or put it back) on
> this error path, and handle the head's frags flag consistently?
This one is real too. It only happens when the XDP queue has no free
descriptor at all, and then the popped frag leaks, the frags after it
stay on the pool's list, and the head keeps its frags flag. It is not
related to the shared info, so separate fix on its own instead of
growing this series.
Björn
next prev parent reply other threads:[~2026-11-30 11:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 14:21 [PATCH net 0/3] xsk: Keep the shared info of zero-copy buffers in kernel memory Björn Töpel
2026-11-27 14:21 ` [PATCH net 1/3] libeth: xsk: Count each XDP_TX buffer on its own Björn Töpel
2026-11-28 15:14 ` netdev-bot+sashiko
2026-11-30 11:58 ` Björn Töpel [this message]
2026-11-27 14:21 ` [PATCH net 2/3] xsk: Keep the shared info of zero-copy buffers in kernel memory Björn Töpel
2026-11-27 19:26 ` Maciej Fijalkowski
2026-11-30 12:05 ` Björn Töpel
2026-11-28 15:14 ` netdev-bot+sashiko
2026-11-30 12:04 ` Björn Töpel
2026-11-27 14:21 ` [PATCH net 3/3] selftests/bpf: Drop the zero-copy tailroom from the xsk tests Björn Töpel
2026-11-27 15:49 ` Maciej Fijalkowski
2026-11-27 16:56 ` Björn Töpel
2026-11-27 14:24 ` [PATCH net 0/3] xsk: Keep the shared info of zero-copy buffers in kernel memory netdev-bot+sinfo
2026-11-30 11:53 ` Björn Töpel
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=87cxrm1qgi.fsf@all.your.base.are.belong.to.us \
--to=bjorn@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=andrii@kernel.org \
--cc=anthony.l.nguyen@intel.com \
--cc=ast@kernel.org \
--cc=bastien.curutchet@bootlin.com \
--cc=bpf@vger.kernel.org \
--cc=colin.i.king@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=edumazet@kernel.org \
--cc=emil@etsalapatis.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=ihor.solodrai@linux.dev \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--cc=tushar.vyavahare@intel.com \
--cc=willemb@google.com \
--cc=yonghong.song@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox