Skip to content

Commit 3071c51

Browse files
jlemondavem330
authored andcommitted
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: 322b87c ("bnxt_en: add page_pool support") Signed-off-by: Jonathan Lemon <[email protected]> Reviewed-by: Andy Gospodarek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 451c790 commit 3071c51

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/broadcom/bnxt

1 file changed

+1
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp,
944944
dma_addr -= bp->rx_dma_offset;
945945
dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
946946
DMA_ATTR_WEAK_ORDERING);
947+
page_pool_release_page(rxr->page_pool, page);
947948

948949
if (unlikely(!payload))
949950
payload = eth_get_headlen(bp->dev, data_ptr, len);

0 commit comments

Comments
 (0)