diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-06-21 18:25:06 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-23 13:42:19 -0400 |
commit | 9f82fca9422eab3877ab2b697ccc5eef44c63b54 (patch) | |
tree | 72464a7e9cf0d1e722a2cceb41ae9f37e1337beb /drivers/net/ethernet/netronome/nfp/nfp_net.h | |
parent | c443b5accedaef8e1d6faf7a1bb921670a90a3d0 (diff) | |
download | lwn-9f82fca9422eab3877ab2b697ccc5eef44c63b54.tar.gz lwn-9f82fca9422eab3877ab2b697ccc5eef44c63b54.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_net.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net.h b/drivers/net/ethernet/netronome/nfp/nfp_net.h index 02fd8d4e253c..7952fbfb94d6 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_net.h @@ -541,6 +541,7 @@ struct nfp_net_dp { * @rss_cfg: RSS configuration * @rss_key: RSS secret key * @rss_itbl: RSS indirection table + * @xdp_flags: Flags with which XDP prog was loaded * @max_r_vecs: Number of allocated interrupt vectors for RX/TX * @max_tx_rings: Maximum number of TX rings supported by the Firmware * @max_rx_rings: Maximum number of RX rings supported by the Firmware @@ -590,6 +591,8 @@ struct nfp_net { u8 rss_key[NFP_NET_CFG_RSS_KEY_SZ]; u8 rss_itbl[NFP_NET_CFG_RSS_ITBL_SZ]; + u32 xdp_flags; + unsigned int max_tx_rings; unsigned int max_rx_rings; |