Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2024-01-10 Thread Jakub Kicinski
On Wed, 10 Jan 2024 09:50:08 -0800 Shakeel Butt wrote: > On Thu, Jan 4, 2024 at 1:44 PM Jakub Kicinski wrote: > > You seem to be trying hard to make struct netmem a thing. > > Perhaps you have a reason I'm not getting? > > Mina already went with your suggestion and that is fine. To me, struct

Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2024-01-10 Thread Shakeel Butt
On Thu, Jan 4, 2024 at 1:44 PM Jakub Kicinski wrote: > [...] > > You seem to be trying hard to make struct netmem a thing. > Perhaps you have a reason I'm not getting? Mina already went with your suggestion and that is fine. To me, struct netmem is more aesthetically aligned with the existing

Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2024-01-04 Thread Mina Almasry
On Thu, Jan 4, 2024 at 1:44 PM Jakub Kicinski wrote: > > On Thu, 21 Dec 2023 15:44:22 -0800 Mina Almasry wrote: > > The warning is like so: > > > > ./include/net/page_pool/helpers.h: In function ‘page_pool_alloc’: > > ./include/linux/stddef.h:8:14: warning: returning ‘void *’ from a > > function

Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2024-01-04 Thread Jakub Kicinski
On Thu, 21 Dec 2023 15:44:22 -0800 Mina Almasry wrote: > The warning is like so: > > ./include/net/page_pool/helpers.h: In function ‘page_pool_alloc’: > ./include/linux/stddef.h:8:14: warning: returning ‘void *’ from a > function with return type ‘netmem_ref’ {aka ‘long unsigned int’} makes >

Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2023-12-21 Thread Mina Almasry
On Thu, Dec 21, 2023 at 3:23 PM Shakeel Butt wrote: > > On Wed, Dec 20, 2023 at 01:45:01PM -0800, Mina Almasry wrote: > > Add the netmem_ref type, an abstraction for network memory. > > > > To add support for new memory types to the net stack, we must first > > abstract the current memory type.

Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2023-12-21 Thread Shakeel Butt
On Wed, Dec 20, 2023 at 01:45:01PM -0800, Mina Almasry wrote: > Add the netmem_ref type, an abstraction for network memory. > > To add support for new memory types to the net stack, we must first > abstract the current memory type. Currently parts of the net stack > use struct page directly: > >

[PATCH net-next v3 2/3] net: introduce abstraction for network memory

2023-12-20 Thread Mina Almasry
Add the netmem_ref type, an abstraction for network memory. To add support for new memory types to the net stack, we must first abstract the current memory type. Currently parts of the net stack use struct page directly: - page_pool - drivers - skb_frag_t Originally the plan was to reuse struct