linux/drivers/net/ethernet/intel/igc
Andre Guedes 73f1071c1d igc: Add support for XDP_TX action
Add support for XDP_TX action which enables XDP programs to transmit
back receiving frames.

I225 controller has only 4 Tx hardware queues. Since XDP programs may
not even issue an XDP_TX action, this patch doesn't reserve dedicated
queues just for XDP like other Intel drivers do. Instead, the queues
are shared between the network stack and XDP. The netdev queue lock is
used to ensure mutual exclusion.

Since frames can now be transmitted via XDP_TX, the igc_tx_buffer
structure is modified so we are able to save a reference to the xdp
frame for later clean up once the packet is transmitted. The tx_buffer
is mapped to either a skb or a xdpf so we use a union to save the skb
or xdpf pointer and have a bit in tx_flags to indicate which field to
use.

This patch has been tested with the sample app "xdp2" 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:12:19 -07:00
..
igc.h igc: Add support for XDP_TX action 2021-03-29 09:12:19 -07:00
igc_base.c igc: Add new device ID 2020-12-10 13:13:24 -08:00
igc_base.h
igc_defines.h igc: Remove unused MII_CR_LOOPBACK 2021-03-19 13:53:49 -07:00
igc_diag.c
igc_diag.h
igc_dump.c igc: Fix TDBAL register show incorrect value 2021-02-03 16:32:17 -08:00
igc_ethtool.c igc: Fix Supported Pause Frame Link Setting 2021-03-11 09:37:48 -08:00
igc_hw.h igc: Clean up nvm_operations structure 2021-02-03 15:20:32 -08:00
igc_i225.c igc: Fix prototype warning 2021-03-23 11:34:02 -07:00
igc_i225.h igc: Add initial LTR support 2020-06-29 18:21:09 -07:00
igc_mac.c igc: check return value of ret_val in igc_config_fc_after_link_up 2021-02-01 10:04:43 -08:00
igc_mac.h
igc_main.c igc: Add support for XDP_TX action 2021-03-29 09:12:19 -07:00
igc_nvm.c
igc_nvm.h
igc_phy.c igc: Expose the gPHY firmware version 2021-02-03 15:20:32 -08:00
igc_phy.h igc: Expose the gPHY firmware version 2021-02-03 15:20:32 -08:00
igc_ptp.c igc: Refactor Rx timestamp handling 2021-03-29 08:49:20 -07:00
igc_regs.h igc: Expose the gPHY firmware version 2021-02-03 15:20:32 -08:00
igc_tsn.c
igc_tsn.h
igc_xdp.c igc: Add support for XDP_TX action 2021-03-29 09:12:19 -07:00
igc_xdp.h igc: Add support for XDP_TX action 2021-03-29 09:12:19 -07:00
Makefile igc: Add initial XDP support 2021-03-29 09:09:53 -07:00