]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
idpf: access ->pp through netmem_desc instead of page
authorByungchul Park <byungchul@sk.com>
Mon, 21 Jul 2025 02:18:32 +0000 (11:18 +0900)
committerJakub Kicinski <kuba@kernel.org>
Thu, 24 Jul 2025 00:46:55 +0000 (17:46 -0700)
To eliminate the use of struct page in page pool, the page pool users
should use netmem descriptor and APIs instead.

Make idpf access ->pp through netmem_desc instead of page.

Signed-off-by: Byungchul Park <byungchul@sk.com>
Link: https://patch.msgid.link/20250721021835.63939-10-byungchul@sk.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/idpf/idpf_txrx.c

index c976d9e15aca17c558d4e7b8b8f8549c3ae908f0..66a1b040639d1110519ca8fd57c2bdf0fdb2d822 100644 (file)
@@ -3276,8 +3276,10 @@ static u32 idpf_rx_hsplit_wa(const struct libeth_fqe *hdr,
 
        hdr_page = __netmem_to_page(hdr->netmem);
        buf_page = __netmem_to_page(buf->netmem);
-       dst = page_address(hdr_page) + hdr->offset + hdr_page->pp->p.offset;
-       src = page_address(buf_page) + buf->offset + buf_page->pp->p.offset;
+       dst = page_address(hdr_page) + hdr->offset +
+               pp_page_to_nmdesc(hdr_page)->pp->p.offset;
+       src = page_address(buf_page) + buf->offset +
+               pp_page_to_nmdesc(buf_page)->pp->p.offset;
 
        memcpy(dst, src, LARGEST_ALIGN(copy));
        buf->offset += copy;
@@ -3296,7 +3298,7 @@ static u32 idpf_rx_hsplit_wa(const struct libeth_fqe *hdr,
 struct sk_buff *idpf_rx_build_skb(const struct libeth_fqe *buf, u32 size)
 {
        struct page *buf_page = __netmem_to_page(buf->netmem);
-       u32 hr = buf_page->pp->p.offset;
+       u32 hr = pp_page_to_nmdesc(buf_page)->pp->p.offset;
        struct sk_buff *skb;
        void *va;