[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1591089148-959-1-git-send-email-lirongqing@baidu.com>
Date: Tue, 2 Jun 2020 17:12:28 +0800
From: Li RongQing <lirongqing@...du.com>
To: netdev@...r.kernel.org, bpf@...r.kernel.org
Subject: [PATCH] i40e: fix wrong index in i40e_xsk_umem_dma_map
Fixes: 0a714186d3c0 "(i40e: add AF_XDP zero-copy Rx support)"
Signed-off-by: Li RongQing <lirongqing@...du.com>
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
index 0b7d29192b2c..c926438118ea 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_xsk.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_xsk.c
@@ -37,9 +37,9 @@ static int i40e_xsk_umem_dma_map(struct i40e_vsi *vsi, struct xdp_umem *umem)
out_unmap:
for (j = 0; j < i; j++) {
- dma_unmap_page_attrs(dev, umem->pages[i].dma, PAGE_SIZE,
+ dma_unmap_page_attrs(dev, umem->pages[j].dma, PAGE_SIZE,
DMA_BIDIRECTIONAL, I40E_RX_DMA_ATTR);
- umem->pages[i].dma = 0;
+ umem->pages[j].dma = 0;
}
return -1;
--
2.16.2
Powered by blists - more mailing lists