Unverified Commit 7df4077a authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11461 bnxt_en: Fix double DMA unmapping for XDP_REDIRECT

parents 84404f24 821ecbea
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -297,11 +297,6 @@ bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons,
		 * redirect is coming from a frame received by the
		 * bnxt_en driver.
		 */
		rx_buf = &rxr->rx_buf_ring[cons];
		mapping = rx_buf->mapping - bp->rx_dma_offset;
		dma_unmap_page_attrs(&pdev->dev, mapping,
				     BNXT_RX_PAGE_SIZE, bp->rx_dir,
				     DMA_ATTR_WEAK_ORDERING);

		/* if we are unable to allocate a new buffer, abort and reuse */
		if (bnxt_alloc_rx_data(bp, rxr, rxr->rx_prod, GFP_ATOMIC)) {