]> git.ipfire.org Git - thirdparty/linux.git/commit
i40e: add tracking of AF_XDP ZC state for each queue pair
authorBjörn Töpel <bjorn.topel@intel.com>
Tue, 12 Feb 2019 08:52:05 +0000 (09:52 +0100)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 1 Apr 2019 18:32:48 +0000 (11:32 -0700)
commit44ddd4f1709249dd1779dda7c907668a0b9ef833
tree533f3d9dbef825a3bf4f54b745b883f23c8c8429
parentb83f28e1e38a8324eaa5e55f2c7ee2f75e748f08
i40e: add tracking of AF_XDP ZC state for each queue pair

In commit f3fef2b6e1cc ("i40e: Remove umem from VSI") a regression was
introduced; When the VSI was reset, the setup code would try to enable
AF_XDP ZC unconditionally (as long as there was a umem placed in the
netdev._rx struct). Here, we add a bitmap to the VSI that tracks if a
certain queue pair has been "zero-copy enabled" via the ndo_bpf. The
bitmap is used in i40e_xsk_umem, and enables zero-copy if and only if
XDP is enabled, the corresponding qid in the bitmap is set and the
umem is non-NULL.

Fixes: f3fef2b6e1cc ("i40e: Remove umem from VSI")
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_xsk.c