# Re: \[RFC 01/19\] netmem: rename struct net\_iov to struct netmem\_desc

- From: Byungchul Park \<byungchul@sk.com\>
- Date: 2025-05-13 02:00:13 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/05/3052387
- Thread: https://ratatoskr.run/netdev/2025/05/3048935/t.md

```text
On Mon, May 12, 2025 at 12:14:13PM -0700, Mina Almasry wrote:
> On Mon, May 12, 2025 at 6:29 AM Byungchul Park [ref] wrote:
> >
> > On Mon, May 12, 2025 at 02:11:13PM +0100, Pavel Begunkov wrote:
> > > On 5/9/25 12:51, Byungchul Park wrote:
> > > > To simplify struct page, the page pool members of struct page should be
> > > > moved to other, allowing these members to be removed from struct page.
> > > >
> > > > Reuse struct net_iov for also system memory, that already mirrored the
> > > > page pool members.
> > > >
> > > > Signed-off-by: Byungchul Park <byungchul@sk.com>
> > > > ---
> > > >   include/linux/skbuff.h                  |  4 +--
> > > >   include/net/netmem.h                    | 20 ++++++------
> > > >   include/net/page_pool/memory_provider.h |  6 ++--
> > > >   io_uring/zcrx.c                         | 42 ++++++++++++-------------
> > >
> > > You're unnecessarily complicating it for yourself. It'll certainly
> > > conflict with changes in the io_uring tree, and hence it can't
> > > be taken normally through the net tree.
> > >
> > > Why are you renaming it in the first place? If there are good
> >
> > It's because the struct should be used for not only io vetor things but
> > also system memory.  Current network code uses struct page as system
> > memory descriptor but struct page fields for page pool will be gone.
> >
> > So I had to reuse struct net_iov and I thought renaming it made more
> > sense.  It'd be welcome if you have better idea.
> >
> 
> As I said in another thread, struct page should not embed struct

I don't understand here.  Can you explain more?  Do you mean do not use
place holder?

> net_iov as-is. struct net_iov already has fields that are unrelated to
> page (like net_iov_owner) and more will be added in the future.
> 
> I think what Matthew seems to agree with AFAIU in the other thread is
> creating a new struct, struct netmem_desc, and having struct net_iov
> embed netmem_desc.

This would look better.  I will try.

	Byungchul

> -- 
> Thanks,
> Mina
```
