i40e: read the XDP program once per NAPI

Similar to how it's done in the ice driver since 'eb087cd828 ("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>
This commit is contained in:
Ciara Loftus 2022-06-23 10:08:52 +00:00 • committed by Jakub Kicinski
commit 78f3193157
2 changed files with 16 additions and 12 deletions