From: sashiko-bot@kernel.org
To: "Björn Töpel" <bjorn@kernel.org>, bpf@vger.kernel.org
Subject: Re: [PATCH net-next 6/7] selftests: net: Test XDP with devmem bindings
Date: Wed, 18 Nov 2026 16:48:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-221556@kernel.org> (raw)
In-Reply-To: <20261117164700.2157816-7-bjorn@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] selftests: net: devmem_xdp_check() fails instead of skipping
without devmem
--
commit af2bb584e6a40d5bea937deb32aab6eee5f5687a
Author: Björn Töpel <bjorn@kernel.org>
selftests: net: Test XDP with devmem bindings
This commit adds a selftest in nl_netdev.py verifying the attachment rules
for native and generic XDP programs alongside devmem RX bindings on
netdevsim.
> diff --git a/tools/testing/selftests/net/nl_netdev.py b/tools/testing/selftests/net/nl_netdev.py
> index dd0321c0b463a..15326fb663624 100755
> --- a/tools/testing/selftests/net/nl_netdev.py
> +++ b/tools/testing/selftests/net/nl_netdev.py
[ ... ]
> @@ -483,6 +484,54 @@ def devmem_bind_tx_unregister_check(_nf) -> None:
> nf_priv.close()
>
>
> +def devmem_xdp_check(_nf) -> None:
[ ... ]
> + # A generic program keeps the provider away
> + ip(f"link set dev {dev} xdpgeneric obj {prog} sec xdp.frags")
> + with ksft_raises(NlError) as cm:
> + nf_priv.bind_rx({"ifindex": nsim.ifindex, "fd": dmabuf_fd,
> + "queues": [{"id": 1, "type": "rx"}]})
> + ksft_eq(cm.exception.nl_msg.error, -errno.EEXIST)
> + ip(f"link set dev {dev} xdpgeneric off")
> +
> + # A native program first, then the provider
> + ip(f"link set dev {dev} xdpdrv obj {prog} sec xdp.frags")
> + _devmem_bind(nf_priv.bind_rx, {
> + "ifindex": nsim.ifindex,
> + "fd": dmabuf_fd,
> + "queues": [{"id": 1, "type": "rx"}],
> + })
[Severity: Low]
Does devmem_xdp_check() fail instead of skipping when CONFIG_NET_DEVMEM is
disabled?
In netdev_nl_bind_rx_doit(), net_devmem_bind_dmabuf() runs before
net_devmem_bind_dmabuf_to_queue() and returns -EOPNOTSUPP when
CONFIG_NET_DEVMEM is disabled. Because the first nf_priv.bind_rx() call
does not go through _devmem_bind(), ksft_eq() compares -EOPNOTSUPP against
-EEXIST and sets KSFT_RESULT = False before the later _devmem_bind() call
raises KsftSkipEx, causing ksft_run() to report a failure.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117164700.2157816-1-bjorn@kernel.org?part=6
next prev parent reply other threads:[~2026-11-18 16:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 16:46 [PATCH net-next 0/7] XDP with io_uring zero-copy RX and devmem Björn Töpel
2026-11-17 16:46 ` [PATCH net-next 1/7] bpf: Keep XDP helpers within readable data Björn Töpel
2026-11-17 16:46 ` [PATCH net-next 2/7] xdp: Reject frames with unreadable fragments Björn Töpel
2026-11-17 16:46 ` [PATCH net-next 3/7] net: Admit native XDP on provider queues Björn Töpel
2026-11-18 16:48 ` sashiko-bot
2026-11-17 16:46 ` [PATCH net-next 4/7] eth: fbnic: Run " Björn Töpel
2026-11-17 16:46 ` [PATCH net-next 5/7] netdevsim: Run native XDP next to devmem Björn Töpel
2026-11-17 16:46 ` [PATCH net-next 6/7] selftests: net: Test XDP with devmem bindings Björn Töpel
2026-11-18 16:48 ` sashiko-bot [this message]
2026-11-17 16:46 ` [PATCH net-next 7/7] selftests: net: Test XDP on io_uring RX Björn Töpel
2026-11-18 16:48 ` 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-221556@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox