BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/2] xsk: support redirect to any socket bound to the same umem
@ 2024-02-05 12:35 Magnus Karlsson
  2024-02-05 12:35 ` [PATCH bpf-next 1/2] " Magnus Karlsson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Magnus Karlsson @ 2024-02-05 12:35 UTC (permalink / raw)
  To: magnus.karlsson, bjorn, ast, daniel, netdev, maciej.fijalkowski,
	yuvale
  Cc: Magnus Karlsson, bpf

This patch set adds support for directing a packet to any socket bound
to the same umem. This makes it possible to use the XDP program to
select what socket the packet should be received on. The user can
populate the XSKMAP with various sockets and as long as they share the
same umem, the XDP program can pick any one of them.

The implementation is straight-forward. Instead of testing that the
incoming packet is targeting the same device and queue id as the
socket is bound to, just check that the umem the packet was received
on is the same as the socket we want it to be received on. This
guarantees that the redirect is legal as it is already in the correct
umem.

Patch #1 implements the feature and patch #2 adds documentation.

Thanks: Magnus

Magnus Karlsson (2):
  xsk: support redirect to any socket bound to the same umem
  xsk: document ability to redirect to any socket bound to the same umem

 Documentation/networking/af_xdp.rst | 33 +++++++++++++++++------------
 net/xdp/xsk.c                       |  5 ++++-
 2 files changed, 23 insertions(+), 15 deletions(-)


base-commit: 2a79690eae953daaac232f93e6c5ac47ac539f2d
--
2.42.0

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

end of thread, other threads:[~2024-02-06  4:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05 12:35 [PATCH bpf-next 0/2] xsk: support redirect to any socket bound to the same umem Magnus Karlsson
2024-02-05 12:35 ` [PATCH bpf-next 1/2] " Magnus Karlsson
2024-02-05 14:26   ` Willem de Bruijn
2024-02-05 12:35 ` [PATCH bpf-next 2/2] xsk: document ability to " Magnus Karlsson
2024-02-06  4:10 ` [PATCH bpf-next 0/2] xsk: support " patchwork-bot+netdevbpf

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