Message ID | 20210817203736.3529939-1-anthony.l.nguyen@intel.com |
---|---|
State | New |
Headers | show |
Series | [net,1/1] ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path | expand |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Tue, 17 Aug 2021 13:37:36 -0700 you wrote: > From: Wang Hai <wanghai38@huawei.com> > > 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. > > [...] Here is the summary with links: - [net,1/1] ixgbe, xsk: clean up the resources in ixgbe_xsk_pool_enable error path https://git.kernel.org/netdev/net/c/1b80fec7b043 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c index 96dd1a4f956a..b1d22e4d5ec9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c @@ -52,8 +52,11 @@ static int ixgbe_xsk_pool_enable(struct ixgbe_adapter *adapter, /* Kick start the NAPI context so that receiving will start */ err = ixgbe_xsk_wakeup(adapter->netdev, qid, XDP_WAKEUP_RX); - if (err) + if (err) { + clear_bit(qid, adapter->af_xdp_zc_qps); + xsk_pool_dma_unmap(pool, IXGBE_RX_DMA_ATTR); return err; + } } return 0;