]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path
authorWang Hai <wanghai38@huawei.com>
Tue, 17 Aug 2021 20:37:36 +0000 (13:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Aug 2021 00:47:52 +0000 (17:47 -0700)
commit09a61253c933e751e7d82b5cccd91a55c95c3832
treeaa50c12f42ab6bead3b1913422759db8078b8b72
parentbcf7f46eff8c5b48bd505fd0548c7435db96f86a
ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path

In ixgbe_xsk_pool_enable(), if ixgbe_xsk_wakeup() fails,
We should restore the previous state and clean up the
resources. Add the missing clear af_xdp_zc_qps and unmap dma
to fix this bug.

Fixes: c37d2bef10f0 ("ixgbe: add tracking of AF_XDP zero-copy state for each queue pair")
Fixes: df515e0518f4 ("ixgbe: fix potential RX buffer starvation for AF_XDP")
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Tested-by: Sandeep Penigalapati <sandeep.penigalapati@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20210817203736.3529939-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c