summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2020-01-09 11:35:42 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-10 23:03:44 -0800
commit3071c51783b39d6a676d02a9256c3b3f87804285 (patch)
tree18e91106d75dbb2c6164596a112f30f61adf3c4a
parent451c790053b98cdf341cf4c0419fd6cdec25aa2a (diff)
downloadlinux-3071c51783b39d6a676d02a9256c3b3f87804285.tar.gz
linux-3071c51783b39d6a676d02a9256c3b3f87804285.tar.bz2
linux-3071c51783b39d6a676d02a9256c3b3f87804285.zip
bnxt: Detach page from page pool before sending up the stack
When running in XDP mode, pages come from the page pool, and should be freed back to the same pool or specifically detached. Currently, when the driver re-initializes, the page pool destruction is delayed forever since it thinks there are oustanding pages. Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support") Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> Reviewed-by: Andy Gospodarek <gospo@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 39d4309b17fb..33eb8cd6551e 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -944,6 +944,7 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp,
dma_addr -= bp->rx_dma_offset;
dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
DMA_ATTR_WEAK_ORDERING);
+ page_pool_release_page(rxr->page_pool, page);
if (unlikely(!payload))
payload = eth_get_headlen(bp->dev, data_ptr, len);