public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] net: devmem: support devmem with netkit devices
@ 2026-03-16 22:29 Bobby Eshleman
  2026-03-16 22:29 ` [PATCH net-next 1/6] net: devmem: support TX through netkit leased queues Bobby Eshleman
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Bobby Eshleman @ 2026-03-16 22:29 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Andrew Lunn, Shuah Khan
  Cc: Stanislav Fomichev, Mina Almasry, Wei Wang, David Wei, netdev,
	linux-kernel, linux-kselftest, bpf, Bobby Eshleman

This series introduces support for TCP devmem with netkit devices.

When a physical device leases a queue to a netkit device, the netkit
device is free to bind-rx on that queue. This works out-of-the-box and
for this RX path this series only introduces tests. The tx path, via
bind-tx, is less forgiving. Before the skb ever encounters the netkit
forwarding policy or BPF redirection verdict, the skb is dropped
because the upper devmem TX path deems the underlying netkit device
unsuitable for DMA and netmem TX.

This patch series introduces netkit and queue leasing awareness to
bind-tx and the devmem TX path, so that devmem packets do not
prematurely drop even when destined for a suitable netkit device.

When bind-tx is called on a netkit device that has been leased a queue
from a physical device, the binding looks up and remembers the physical
device if it supports netmem tx. This physical device is then used in
bind-tx and TX skb validation where the checks for netmem_tx are
performed on the physical device instead of the virtual device. If no
queue has been leased or the physical device doesn't support netmem TX,
then as usual these checks will fail.

If BPF redirect or ip forwarding lands the skb in the TX path of a
device that does not support netmem, then validate_xmit_unreadable_skb()
will fail and the pkt dropped.

This series depends on the queue leasing series:
https://lore.kernel.org/all/20260129222830.439687-1-daniel@iogearbox.net/

Signed-off-by: Bobby Eshleman <bobbyeshleman@meta.com>
---
Bobby Eshleman (6):
      net: devmem: support TX through netkit leased queues
      selftests: drv-net: extract _find_bss_map_id helper in NetDrvContEnv
      selftests: drv-net: add skip-config flag to ncdevmem
      selftests: drv-net: add primary RX redirect support to NetDrvContEnv
      selftests: drv-net: add netkit devmem RX test
      selftests: drv-net: add netkit devmem TX test

 net/core/dev.c                                     |  26 +++--
 net/core/devmem.c                                  |  16 ++-
 net/core/devmem.h                                  |   6 +-
 net/core/netdev-genl.c                             |  38 ++++++-
 tools/testing/selftests/drivers/net/hw/.gitignore  |   1 +
 tools/testing/selftests/drivers/net/hw/Makefile    |   1 +
 tools/testing/selftests/drivers/net/hw/ncdevmem.c  |  58 ++++++----
 .../testing/selftests/drivers/net/hw/nk_devmem.py  | 123 +++++++++++++++++++++
 .../drivers/net/hw/nk_primary_rx_redirect.bpf.c    |  41 +++++++
 tools/testing/selftests/drivers/net/lib/py/env.py  |  60 ++++++++--
 10 files changed, 314 insertions(+), 56 deletions(-)
---
base-commit: 6c80a1ec8984e01a4d92225ecaba66ab74063d2c
change-id: 20260313-scratch-bobbyeshleman-tcp-dm-netkit5-fb85f437568c

Best regards,
-- 
Bobby Eshleman <bobbyeshleman@meta.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-03-19  0:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 22:29 [PATCH net-next 0/6] net: devmem: support devmem with netkit devices Bobby Eshleman
2026-03-16 22:29 ` [PATCH net-next 1/6] net: devmem: support TX through netkit leased queues Bobby Eshleman
2026-03-16 22:29 ` [PATCH net-next 2/6] selftests: drv-net: extract _find_bss_map_id helper in NetDrvContEnv Bobby Eshleman
2026-03-16 22:29 ` [PATCH net-next 3/6] selftests: drv-net: add skip-config flag to ncdevmem Bobby Eshleman
2026-03-16 22:29 ` [PATCH net-next 4/6] selftests: drv-net: add primary RX redirect support to NetDrvContEnv Bobby Eshleman
2026-03-16 22:29 ` [PATCH net-next 5/6] selftests: drv-net: add netkit devmem RX test Bobby Eshleman
2026-03-18  0:08   ` Stanislav Fomichev
2026-03-18  0:54     ` Bobby Eshleman
2026-03-18 14:59       ` Stanislav Fomichev
2026-03-18 16:21         ` Bobby Eshleman
2026-03-18 23:10           ` Jakub Kicinski
2026-03-19  0:01             ` Bobby Eshleman
2026-03-16 22:29 ` [PATCH net-next 6/6] selftests: drv-net: add netkit devmem TX test Bobby Eshleman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox