Re: [PATCH net-next v16 04/13] netdev: netdevice devmem allocator

2024-07-10 Thread Mina Almasry
On Wed, Jul 10, 2024 at 12:55 PM Jakub Kicinski wrote: > > On Wed, 10 Jul 2024 12:29:58 -0700 Mina Almasry wrote: > > On Wed, Jul 10, 2024 at 9:37 AM Jakub Kicinski wrote: > > > On Wed, 10 Jul 2024 00:17:37 + Mina Almasry wrote: > > > > + net_devmem_dmabuf_binding_get(binding); > > > > >

Re: [PATCH net-next v16 04/13] netdev: netdevice devmem allocator

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 12:29:58 -0700 Mina Almasry wrote: > On Wed, Jul 10, 2024 at 9:37 AM Jakub Kicinski wrote: > > On Wed, 10 Jul 2024 00:17:37 + Mina Almasry wrote: > > > + net_devmem_dmabuf_binding_get(binding); > > > > Why does every iov need to hold a ref? pp holds a ref and does i

Re: [PATCH net-next v16 04/13] netdev: netdevice devmem allocator

2024-07-10 Thread Mina Almasry
On Wed, Jul 10, 2024 at 9:37 AM Jakub Kicinski wrote: > > On Wed, 10 Jul 2024 00:17:37 + Mina Almasry wrote: > > + net_devmem_dmabuf_binding_get(binding); > > Why does every iov need to hold a ref? pp holds a ref and does its own > accounting, so it won't disappear unless all the pages are

Re: [PATCH net-next v16 04/13] netdev: netdevice devmem allocator

2024-07-10 Thread Jakub Kicinski
On Wed, 10 Jul 2024 00:17:37 + Mina Almasry wrote: > + net_devmem_dmabuf_binding_get(binding); Why does every iov need to hold a ref? pp holds a ref and does its own accounting, so it won't disappear unless all the pages are returned.

[PATCH net-next v16 04/13] netdev: netdevice devmem allocator

2024-07-09 Thread Mina Almasry
Implement netdev devmem allocator. The allocator takes a given struct netdev_dmabuf_binding as input and allocates net_iov from that binding. The allocation simply delegates to the binding's genpool for the allocation logic and wraps the returned memory region in a net_iov struct. Signed-off-by: