All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/9][pull request] 1GbE Intel Wired LAN Driver Updates 2021-05-20
@ 2021-05-20 18:17 Tony Nguyen
  2021-05-20 18:17 ` [PATCH net-next v2 1/9] igc: Move igc_xdp_is_enabled() Tony Nguyen
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Tony Nguyen @ 2021-05-20 18:17 UTC (permalink / raw)
  To: davem, kuba
  Cc: Tony Nguyen, netdev, sassmann, jithu.joseph, magnus.karlsson,
	maciej.fijalkowski, sasha.neftin, vitaly.lifshits

This series contains updates to igc driver only.

Andre Guedes says:

This series adds AF_XDP zero-copy feature to igc driver.

The initial patches do some code refactoring, preparing the code base to
land the AF_XDP zero-copy feature, avoiding code duplications. The last
patches of the series are the ones implementing the feature.

The last patch which indeed implements AF_XDP zero-copy support was
originally way too lengthy so, for the sake of code review, I broke it
up into two patches: one adding support for the RX functionality and the
other one adding TX support.
---
v2:
Patch 8/9 - "igc: Enable RX via AF_XDP zero-copy"
 * In XDP_PASS flow, copy metadata too into the skb.
 * When HW timestamp is added by the NIC, after copying it into
   a local variable, update xdp_buff->data_meta so that
   metadata length when XDP program is called 0.
 * In igc_xdp_enable_pool(), call xsk_pool_dma_unmap() on
   failure.

Known issues:
 When an XDP application is running in Tx-Only mode with Zero-Copy
 enabled, it is not expected to add the frames to the fill-queue. I have
 noticed the following two issues in this scenario:
 - If XDP_USE_NEED_WAKEUP flag is not set by application, igc_poll()
   will go into infinite loop because the buffer allocation resulting
   in igc_clean_rx_irq_zc() indicating that all work is not done and NAPI
   should keep polling. This does not occur if XDP_USE_NEED_WAKEUP
   flag is set.
 - Since there are no buffers allocated by userspace for the fill
   queue, there is no memory allocated for the NIC to copy the data
   to. If the packet received is destined to the hardware queue where
   XDP application is running, no packets are received even on other
   queues.
 Both these issues can be mitigated by adding a few frames to the
 fill queue. The second issue can also be mitigated by making sure no
 packets are being received on the hardware queue where Rx is running.

The following are changes since commit a49e72b3bda73d36664a084e47da9727a31b8095:
  net: qrtr: ns: Fix error return code in qrtr_ns_init()
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 1GbE

Andre Guedes (9):
  igc: Move igc_xdp_is_enabled()
  igc: Refactor __igc_xdp_run_prog()
  igc: Refactor igc_clean_rx_ring()
  igc: Refactor XDP rxq info registration
  igc: Introduce TX/RX stats helpers
  igc: Introduce igc_unmap_tx_buffer() helper
  igc: Replace IGC_TX_FLAGS_XDP flag by an enum
  igc: Enable RX via AF_XDP zero-copy
  igc: Enable TX via AF_XDP zero-copy

 drivers/net/ethernet/intel/igc/igc.h      |  33 +-
 drivers/net/ethernet/intel/igc/igc_base.h |   2 +
 drivers/net/ethernet/intel/igc/igc_main.c | 656 ++++++++++++++++++----
 drivers/net/ethernet/intel/igc/igc_xdp.c  | 109 +++-
 drivers/net/ethernet/intel/igc/igc_xdp.h  |   8 +-
 5 files changed, 681 insertions(+), 127 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-05-20 22:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 18:17 [PATCH net-next v2 0/9][pull request] 1GbE Intel Wired LAN Driver Updates 2021-05-20 Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 1/9] igc: Move igc_xdp_is_enabled() Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 2/9] igc: Refactor __igc_xdp_run_prog() Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 3/9] igc: Refactor igc_clean_rx_ring() Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 4/9] igc: Refactor XDP rxq info registration Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 5/9] igc: Introduce TX/RX stats helpers Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 6/9] igc: Introduce igc_unmap_tx_buffer() helper Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 7/9] igc: Replace IGC_TX_FLAGS_XDP flag by an enum Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 8/9] igc: Enable RX via AF_XDP zero-copy Tony Nguyen
2021-05-20 18:17 ` [PATCH net-next v2 9/9] igc: Enable TX " Tony Nguyen
2021-05-20 22:30 ` [PATCH net-next v2 0/9][pull request] 1GbE Intel Wired LAN Driver Updates 2021-05-20 patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.