Message ID | 20231113130041.58124-9-linyunsheng@huawei.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | A possible proposal for intergating dmabuf to page pool | expand |
diff --git a/net/core/datagram.c b/net/core/datagram.c index 103d46fa0eeb..5556782ac658 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -436,7 +436,15 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset, end = start + skb_frag_size(frag); if ((copy = end - offset) > 0) { struct page *page = skb_frag_page(frag); - u8 *vaddr = kmap(page); + u8 *vaddr; + + if ((page->pp_magic & ~0x3UL) == PP_SIGNATURE) { + struct page_pool_iov *ppiov = (struct page_pool_iov *)page; + + page = ppiov->page; + } + + vaddr = kmap(page); if (copy > len) copy = len;
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> --- net/core/datagram.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)