linux/drivers/net
Andre Guedes 26575105d6 igc: Add initial XDP support
Add the initial XDP support to the igc driver. For now, only XDP_PASS,
XDP_DROP, XDP_ABORTED actions are supported. Upcoming patches will add
support for the remaining XDP actions.

XDP configuration helpers are defined in a new file, igc_xdp.c. These
helpers are utilized in igc_main.c to implement the ndo_bpf callback.
XDP-related code that belongs to the driver's hot path is landed in
igc_main.c.

By default, the driver uses Rx buffers with 2 KB size. When XDP is
enabled, it uses larger buffers so we have enough space to accommodate
the headroom and tailroom required by XDP infrastructure. Also, the
driver doesn't support XDP functionality with frames that span over
multiple buffers so jumbo frames are not allowed for now.

The approach implemented follows the approach implemented in other Intel
drivers as much as possible for the sake of consistency across the
drivers.

Quick comment regarding igc_build_skb(): this patch doesn't touch it
because the function is never called. It seems its support is
incomplete/in progress. The function was added by commit 0507ef8a03
("igc: Add transmit and receive fastpath and interrupt handlers") but
ring_uses_build_skb() always return False since the IGC_RING_FLAG_RX_
BUILD_SKB_ENABLED isn't set anywhere in the driver code.

This patch has been tested with the sample app "xdp1" located in
samples/bpf/ dir.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2021-03-29 09:09:53 -07:00
..
appletalk
arcnet net: arcnet: com20020 fix error handling 2021-03-14 14:17:48 -07:00
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-25 15:31:22 -07:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-24 18:16:04 -07:00
dsa net: dsa: hellcreek: Remove redundant dev_err call in hellcreek_probe() 2021-03-28 18:05:31 -07:00
ethernet igc: Add initial XDP support 2021-03-29 09:09:53 -07:00
fddi
fjes
hamradio module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
hippi
hyperv netvsc: Update driver to use ethtool_sprintf 2021-03-17 11:42:31 -07:00
ieee802154
ipa net: ipa: support more than 6 resource groups 2021-03-26 15:02:39 -07:00
ipvlan
mdio net: mdio: Add BCM6368 MDIO mux bus controller 2021-03-16 11:52:18 -07:00
mhi
netdevsim netdevsim: switch to memdup_user_nul() 2021-03-24 16:26:58 -07:00
pcs net: pcs: add C37 SGMII AN support for intel mGbE controller 2021-03-15 12:53:12 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-25 15:31:22 -07:00
plip
ppp net: ppp: resolve forwarding path for bridge pppoe devices 2021-03-24 12:48:38 -07:00
slip
team
usb net: usb: lan78xx: remove unused including <linux/version.h> 2021-03-25 16:55:33 -07:00
vmxnet3 vmxnet3: Update driver to use ethtool_sprintf 2021-03-17 11:42:31 -07:00
wan farsync: use DEFINE_SPINLOCK() for spinlock 2021-03-26 15:25:44 -07:00
wireguard
wireless mt76: mt7615: remove redundant dev_err call in mt7622_wmac_probe() 2021-03-28 18:04:13 -07:00
xen-netback
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
Kconfig netdevsim: Add dummy psample implementation 2021-03-14 15:00:43 -07:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile dsa: simplify Kconfig symbols and dependencies 2021-03-22 12:15:37 -07:00
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c bpf, devmap: Move drop error path to devmap for XDP_REDIRECT 2021-03-18 16:38:51 +01:00
veth.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-03-25 16:30:46 -07:00
virtio_net.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-03-25 16:30:46 -07:00
vrf.c
vsockmon.c
vxlan.c drivers: net: vxlan.c: Fix declaration issue 2021-03-13 18:06:48 -08:00
xen-netfront.c bpf, devmap: Move drop error path to devmap for XDP_REDIRECT 2021-03-18 16:38:51 +01:00