]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nfp: bpf: don't offload XDP programs in DRV_MODE
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 22 Jun 2017 01:25:06 +0000 (18:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jun 2017 17:42:19 +0000 (13:42 -0400)
commit9f82fca9422eab3877ab2b697ccc5eef44c63b54
tree72464a7e9cf0d1e722a2cceb41ae9f37e1337beb
parentc443b5accedaef8e1d6faf7a1bb921670a90a3d0
nfp: bpf: don't offload XDP programs in DRV_MODE

DRV_MODE means that user space wants the program to be run in
the driver.  Do not try to offload.  Only offload if no mode
flags have been specified.

Remember what the mode is when the program is installed and refuse
new setup requests if there is already a program loaded in a
different mode.  This should leave it open for us to implement
simultaneous loading of two programs - one in the drv path and
another to the NIC later.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net.h
drivers/net/ethernet/netronome/nfp/nfp_net_common.c