xsk: don't allow umem replace at stack level
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 31 Jul 2018 03:43:53 +0000 (20:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Jul 2018 16:48:21 +0000 (09:48 -0700)
commit84c6b86875e01a08a0daa6fdd4a01b36bf0bf0b2
tree06fb904b95b6f0427a577120753713aa39050660
parentf734607e819b951bae3b436b026ec672082e9241
xsk: don't allow umem replace at stack level

Currently drivers have to check if they already have a umem
installed for a given queue and return an error if so.  Make
better use of XDP_QUERY_XSK_UMEM and move this functionality
to the core.

We need to keep rtnl across the calls now.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Björn Töpel <bjorn.topel@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/xdp/xdp_umem.c