i40e: optimize for XDP_REDIRECT in xsk path
authorMagnus Karlsson <magnus.karlsson@intel.com>
Wed, 2 Dec 2020 15:07:22 +0000 (16:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jun 2021 11:39:20 +0000 (13:39 +0200)
commitfbae1a97ce342470dcf2c3f51e63faf2e8e557f0
tree5ab42154d7242e60e9e083c3f44eeabf7cd18fe1
parent1958a31c035dd8981a7313acf8f91ae1886173cc
i40e: optimize for XDP_REDIRECT in xsk path

[ Upstream commit 346497c78d15cdd5bdc3b642a895009359e5457f ]

Optimize i40e_run_xdp_zc() for the XDP program verdict being
XDP_REDIRECT in the xsk zero-copy path. This path is only used when
having AF_XDP zero-copy on and in that case most packets will be
directed to user space. This provides a little over 100k extra packets
in throughput on my server when running l2fwd in xdpsock.

Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_xsk.c