Re: [net-next v1 08/16] memory-provider: dmabuf devmem memory provider

From
David Ahern <dsahern@kernel.org>
Date
2023-12-13 02:19:14
Also in
bpf, dri-devel, linux-arch, linux-kselftest, linux-media, lkml, netdev
Reply to
Mina Almasry, 2023-12-13
On 12/12/23 6:09 PM, Mina Almasry wrote:
OK, I imagine this is not that hard to implement - it's really whether
the change is acceptable to reviewers.

I figure I can start by implementing a no-op abstraction to page*:

typedef struct page netmem_t

and replace the page* in the following places with netmem_t*:

1. page_pool API (not internals)
2. drivers using the page_pool.
3. skb_frag_t.
accessors to skb_frag_t field are now consolidated to
include/linux/skbuff.h (the one IB driver was fixed in Sept by
4ececeb83986), so changing skb_frag_t from bio_vec to something like:

typedef struct skb_frag {
	void *addr;
	unsigned int length;
	unsigned int offset;
};

is trivial. From there, addr can default to `struct page *`. If LSB is
set, strip it and return `struct page_pool_iov *` or `struct buffer_pool *`
Thread (75 messages) 75 messages, 14 authors, last reply 2024-03-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help