# Re: \[RFC 19/19\] mm, netmem: remove the page pool members in struct page

- From: Byungchul Park \<byungchul@sk.com\>
- Date: 2025-05-12 12:58:22 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/05/3051490
- Thread: https://ratatoskr.run/netdev/2025/05/3048935/t.md

```text
On Sat, May 10, 2025 at 10:26:00AM +0300, Ilias Apalodimas wrote:
> Hi Byungchul
> 
> On Fri, 9 May 2025 at 14:51, Byungchul Park [ref] wrote:
> >
> > Now that all the users of the page pool members in struct page have been
> > gone, the members can be removed from struct page.  However, the space
> > in struct page needs to be kept using a place holder with the same size,
> > until struct netmem_desc has its own instance, not overlayed onto struct
> > page, to avoid conficting with other members within struct page.
> >
> 
> FWIW similar mirroring was intially proposed [0] a few years ago
> 
> > Remove the page pool members in struct page and replace with a place
> > holder.  The place holder should be removed once struct netmem_desc has
> > its own instance.
> 
> instance? To make sure I understand this, the netmem_descs are
> expected to be allocated in the future right?

Yes.

> [...]
> 
> > -
> >  static inline struct net_iov_area *net_iov_owner(const struct netmem_desc *niov)
> >  {
> >         return niov->owner;
> > diff --git a/include/net/netmem_type.h b/include/net/netmem_type.h
> > new file mode 100644
> > index 0000000000000..6a3ac8e908515
> > --- /dev/null
> > +++ b/include/net/netmem_type.h
> > @@ -0,0 +1,22 @@
> > +/* SPDX-License-Identifier: GPL-2.0
> > + *
> > + *     Author: Byungchul Park [ref]
> 
> Shouldn't Minas authorship be preserved here?

Ah.  I dunno what I'm supposed to do in the case.  I will remove the
author part :) if it's still okay.

	Byungchul

> > + */
> > +
> > +#ifndef _NET_NETMEM_TYPE_H
> > +#define _NET_NETMEM_TYPE_H
> > +
> > +#include <linux/stddef.h>
> > +
> > +struct netmem_desc {
> > +       unsigned long __unused_padding;
> > +       struct_group_tagged(__netmem_desc, actual_data,
> > +               unsigned long pp_magic;
> > +               struct page_pool *pp;
> > +               struct net_iov_area *owner;
> > +               unsigned long dma_addr;
> > +               atomic_long_t pp_ref_count;
> > +       );
> > +};
> > +
> > +#endif /* _NET_NETMEM_TYPE_H */
> > --
> > 2.17.1
> >
> 
> [0] https://lore.kernel.org/netdev/1549550196-25581-1-git-send-email-ilias.apalodimas@linaro.org/
> Thanks
> /Ilias
```
