]> 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)
commit8c22f52d0152b3e27d0411c66d525ae49000697f
tree10381c413b124dd0ac69d33a4d00b2cd7ce0c3f9
parent93257849132070764b89209c3d88d09839f48bfc
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 223352f66d0f ("i40e: tweak page counting for XDP_REDIRECT")
  commit 8c52a2746044 ("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