mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 06:49:29 -04:00
net: fec: access ->pp through netmem_desc instead of page
To eliminate the use of struct page in page pool, the page pool users should use netmem descriptor and APIs instead. Make fec access ->pp through netmem_desc instead of page. Signed-off-by: Byungchul Park <byungchul@sk.com> Link: https://patch.msgid.link/20250721021835.63939-7-byungchul@sk.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
87dda483e6
commit
65589e860a
@@ -1045,7 +1045,9 @@ static void fec_enet_bd_init(struct net_device *dev)
|
||||
struct page *page = txq->tx_buf[i].buf_p;
|
||||
|
||||
if (page)
|
||||
page_pool_put_page(page->pp, page, 0, false);
|
||||
page_pool_put_page(pp_page_to_nmdesc(page)->pp,
|
||||
page, 0,
|
||||
false);
|
||||
}
|
||||
|
||||
txq->tx_buf[i].buf_p = NULL;
|
||||
@@ -1586,7 +1588,8 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id, int budget)
|
||||
xdp_return_frame_rx_napi(xdpf);
|
||||
} else { /* recycle pages of XDP_TX frames */
|
||||
/* The dma_sync_size = 0 as XDP_TX has already synced DMA for_device */
|
||||
page_pool_put_page(page->pp, page, 0, true);
|
||||
page_pool_put_page(pp_page_to_nmdesc(page)->pp, page,
|
||||
0, true);
|
||||
}
|
||||
|
||||
txq->tx_buf[index].buf_p = NULL;
|
||||
@@ -3348,7 +3351,8 @@ static void fec_enet_free_buffers(struct net_device *ndev)
|
||||
} else {
|
||||
struct page *page = txq->tx_buf[i].buf_p;
|
||||
|
||||
page_pool_put_page(page->pp, page, 0, false);
|
||||
page_pool_put_page(pp_page_to_nmdesc(page)->pp,
|
||||
page, 0, false);
|
||||
}
|
||||
|
||||
txq->tx_buf[i].buf_p = NULL;
|
||||
|
||||
Reference in New Issue
Block a user