Commit 3071c517 authored by Jonathan Lemon's avatar Jonathan Lemon Committed by David S. Miller

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: 322b87ca ("bnxt_en: add page_pool support")
Signed-off-by: default avatarJonathan Lemon <jonathan.lemon@gmail.com>
Reviewed-by: default avatarAndy Gospodarek <gospo@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 451c7900
...@@ -944,6 +944,7 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp, ...@@ -944,6 +944,7 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp,
dma_addr -= bp->rx_dma_offset; dma_addr -= bp->rx_dma_offset;
dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir, dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
DMA_ATTR_WEAK_ORDERING); DMA_ATTR_WEAK_ORDERING);
page_pool_release_page(rxr->page_pool, page);
if (unlikely(!payload)) if (unlikely(!payload))
payload = eth_get_headlen(bp->dev, data_ptr, len); payload = eth_get_headlen(bp->dev, data_ptr, len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment