xsk: allow remap of fill and/or completion rings
authorNuno Gonçalves <nunog@fr24.com>
Fri, 24 Mar 2023 10:02:22 +0000 (10:02 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 26 Mar 2023 04:07:35 +0000 (21:07 -0700)
commit5f5a7d8d8bd461f515543040ad7d107cc405d30c
treea682e451ae97a8d77c45c80738e994c49b4576d4
parent8cfee110711ed60bfdd39af0107ddef01d6b72c3
xsk: allow remap of fill and/or completion rings

The remap of fill and completion rings was frowned upon as they
control the usage of UMEM which does not support concurrent use.
At the same time this would disallow the remap of these rings
into another process.

A possible use case is that the user wants to transfer the socket/
UMEM ownership to another process (via SYS_pidfd_getfd) and so
would need to also remap these rings.

This will have no impact on current usages and just relaxes the
remap limitation.

Signed-off-by: Nuno Gonçalves <nunog@fr24.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/r/20230324100222.13434-1-nunog@fr24.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/xdp/xsk.c