linux/drivers/net/ethernet/intel
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
..
e1000 e1000: Fix fall-through warnings for Clang 2021-03-23 11:34:02 -07:00
e1000e Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-03-25 15:31:22 -07:00
fm10k fm10k: Fix fall-through warnings for Clang 2021-03-23 11:34:02 -07:00
i40e Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-03-25 16:30:46 -07:00
iavf intel: clean up mismatched header comments 2021-03-23 11:34:02 -07:00
ice Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-03-25 16:30:46 -07:00
igb Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-03-25 16:30:46 -07:00
igbvf net: igbvf: use skb_csum_is_sctp instead of protocol check 2021-01-19 14:31:25 -08:00
igc igc: Add initial XDP support 2021-03-29 09:09:53 -07:00
ixgb intel: handle unused assignments 2020-09-25 16:28:59 -07:00
ixgbe Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-03-25 16:30:46 -07:00
ixgbevf ixgbevf: Fix fall-through warnings for Clang 2021-03-23 11:34:02 -07:00
e100.c e100: switch from 'pci_' to 'dma_' API 2021-01-28 18:31:18 -08:00
Kconfig ice: implement device flash update via devlink 2020-07-28 17:07:06 -07:00
Makefile