xdp: don't make drivers report attachment mode
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 12 Jul 2018 03:36:39 +0000 (20:36 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 13 Jul 2018 18:26:35 +0000 (20:26 +0200)
commit6b8675897338f874c41612655a85d8e10cdb23d8
tree6226692b2779d9c40bb413c7fad298956a2b778e
parent4f91da26c81145f255cb153152ffed70014b1c41
xdp: don't make drivers report attachment mode

prog_attached of struct netdev_bpf should have been superseded
by simply setting prog_id long time ago, but we kept it around
to allow offloading drivers to communicate attachment mode (drv
vs hw).  Subsequently drivers were also allowed to report back
attachment flags (prog_flags), and since nowadays only programs
attached will XDP_FLAGS_HW_MODE can get offloaded, we can tell
the attachment mode from the flags driver reports.  Remove
prog_attached member.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
15 files changed:
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/qlogic/qede/qede_filter.c
drivers/net/netdevsim/bpf.c
drivers/net/tun.c
drivers/net/virtio_net.c
include/linux/netdevice.h
net/core/dev.c
net/core/rtnetlink.c