net/af_xdp: forbid umem sharing for xsks with same context
authorCiara Loftus <ciara.loftus@intel.com>
Tue, 13 Oct 2020 13:10:08 +0000 (13:10 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:17 +0000 (19:48 +0200)
commit53a73b7b9db0e62394d94330f7f83c38748490b5
tree6ab9054ed1d987d6eb8b2004b8a8b3f3ae7b47fe
parent352074b3a4b1518f3c1ec70865c407f135d8fa4d
net/af_xdp: forbid umem sharing for xsks with same context

AF_XDP PMDs who wish to share a UMEM must have a unique context
(ctx) ie. netdev,qid tuple. For instance, the following will not
work since both PMDs' contexts are identical.

  --vdev net_af_xdp0,iface=ens786f1,start_queue=0,shared_umem=1
  --vdev net_af_xdp1,iface=ens786f1,start_queue=0,shared_umem=1

Supporting this scenario would require locks, which would impact
the performance of the more typical cases - xsks with different
netdev,qid tuples.

Fixes: 74b46340e2d4 ("net/af_xdp: support shared UMEM")

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
doc/guides/nics/af_xdp.rst
drivers/net/af_xdp/rte_eth_af_xdp.c