xsk: support redirect to any socket bound to the same umem
authorMagnus Karlsson <magnus.karlsson@intel.com>
Mon, 5 Feb 2024 12:35:50 +0000 (13:35 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 6 Feb 2024 04:01:15 +0000 (20:01 -0800)
commit2863d665ea41282379f108e4da6c8a2366ba66db
tree07701d1f1de2c1f89bbb432956b3db71ba513080
parent20a286c1a35ba4dc2fca5d4c1fb2e7ced101e576
xsk: support redirect to any socket bound to the same umem

Add 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.

Suggested-by: Yuval El-Hanany <yuvale@radware.com>
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20240205123553.22180-2-magnus.karlsson@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/xdp/xsk.c