i40e: read the XDP program once per NAPI
authorCiara Loftus <ciara.loftus@intel.com>
Thu, 23 Jun 2022 10:08:52 +0000 (10:08 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 24 Jun 2022 23:37:12 +0000 (16:37 -0700)
commit78f319315764e6730c143570609b230d1bea6928
tree016502dae683bffb1494d27ba027f0bb92fae412
parent85a1c6536f9939696f687d1b0996167e38998fb9
i40e: read the XDP program once per NAPI

Similar to how it's done in the ice driver since 'eb087cd82864 ("ice:
propagate xdp_ring onto rx_ring")', read the XDP program once per NAPI
instead of once per descriptor cleaned. I measured an improvement in
throughput of 2% for the AF_XDP xdpsock l2fwd benchmark for zero copy mode
and 1% for copy mode.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Link: https://lore.kernel.org/r/20220623100852.7867-1-ciara.loftus@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40e/i40e_xsk.c