]> git.baikalelectronics.ru Git - kernel.git/commit
igc: Add support for XDP_REDIRECT action
authorAndre Guedes <andre.guedes@intel.com>
Wed, 10 Mar 2021 07:13:22 +0000 (23:13 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 29 Mar 2021 16:16:35 +0000 (09:16 -0700)
commit1e01c83e3ea1cd14f0387d0ac4989b16d626ac50
tree10381c413b124dd0ac69d33a4d00b2cd7ce0c3f9
parentbee49706521a3b22d52e6e29ad4eae46c45f9efc
igc: Add support for XDP_REDIRECT action

Add support for the XDP_REDIRECT action which enables XDP programs to
redirect packets arriving at I225 NIC. It also implements the
ndo_xdp_xmit ops, enabling the igc driver to transmit packets forwarded
to it by xdp programs running on other interfaces.

The patch tweaks the driver's page counting and recycling scheme as
described in the following two commits and implemented by other Intel
drivers in order to properly support XDP_REDIRECT action:
  commit 18bc64b6beae ("i40e: tweak page counting for XDP_REDIRECT")
  commit 759c7f810f8e ("i40e: avoid premature Rx buffer reuse")

This patch has been tested with the sample apps "xdp_redirect_cpu" and
"xdp_redirect_map" located in samples/bpf/.

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>
drivers/net/ethernet/intel/igc/igc_main.c