bianbu-linux-6.6/drivers/net/ethernet/intel/igc
Andre Guedes fc9df2a0b5 igc: Enable RX via AF_XDP zero-copy
Add support for receiving packets via AF_XDP zero-copy mechanism.

Add a new flag to 'enum igc_ring_flags_t' to indicate the ring has
AF_XDP zero-copy enabled so proper ring setup is carried out during ring
configuration in igc_configure_rx_ring().

RX buffers can now be allocated via the shared pages mechanism (default
behavior of the driver) or via xsk pool (when AF_XDP zero-copy is
enabled) so a union is added to the 'struct igc_rx_buffer' to cover both
cases.

When AF_XDP zero-copy is enabled, rx buffers are allocated from the xsk
pool using the new helper igc_alloc_rx_buffers_zc() which is the
counterpart of igc_alloc_rx_buffers().

Likewise other Intel drivers that support AF_XDP zero-copy, in igc we
have a dedicated path for cleaning up rx irqs when zero-copy is enabled.
This avoids adding too many checks within igc_clean_rx_irq(), resulting
in a more readable and efficient code since this function is called from
the hot-path of the driver.

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-05-20 10:21:42 -07:00
..
igc.h igc: Enable RX via AF_XDP zero-copy 2021-05-20 10:21:42 -07:00
igc_base.c igc: Add new device ID 2020-12-10 13:13:24 -08:00
igc_base.h igc: Enable RX via AF_XDP zero-copy 2021-05-20 10:21:42 -07:00
igc_defines.h igc: enable auxiliary PHC functions for the i225 2021-04-16 13:15:45 -07:00
igc_diag.c igc: add support to eeprom, registers and link self-tests 2020-05-18 15:06:28 -07:00
igc_diag.h igc: add support to eeprom, registers and link self-tests 2020-05-18 15:06:28 -07:00
igc_dump.c igc: Fix TDBAL register show incorrect value 2021-02-03 16:32:17 -08:00
igc_ethtool.c igc: Expose LPI counters 2021-04-16 13:15:45 -07:00
igc_hw.h igc: Clean up nvm_operations structure 2021-02-03 15:20:32 -08:00
igc_i225.c igc: Fix overwrites return value 2021-04-16 13:15:45 -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: remove IGC_REMOVED function 2020-05-19 15:01:48 -07:00
igc_main.c igc: Enable RX via AF_XDP zero-copy 2021-05-20 10:21:42 -07:00
igc_nvm.c igc: Add NVM support 2018-10-17 13:52:00 -07:00
igc_nvm.h igc: Add NVM support 2018-10-17 13:52:00 -07:00
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: enable auxiliary PHC functions for the i225 2021-04-16 13:15:45 -07:00
igc_regs.h igc: enable auxiliary PHC functions for the i225 2021-04-16 13:15:45 -07:00
igc_tsn.c igc: Add support for ETF offloading 2020-04-17 10:19:24 -07:00
igc_tsn.h igc: Add support for taprio offloading 2020-04-17 10:19:24 -07:00
igc_xdp.c igc: Enable RX via AF_XDP zero-copy 2021-05-20 10:21:42 -07:00
igc_xdp.h igc: Enable RX via AF_XDP zero-copy 2021-05-20 10:21:42 -07:00
Makefile igc: Add initial XDP support 2021-03-29 09:09:53 -07:00