Re: [PATCH net-next v6 1/9] netmem: introduce struct netmem_desc mirroring struct page

From: Pavel Begunkov
Date: Mon Jun 23 2025 - 15:27:28 EST


On 6/23/25 20:09, Mina Almasry wrote:
On Mon, Jun 23, 2025 at 5:18 AM Harry Yoo <harry.yoo@xxxxxxxxxx> wrote:

On Mon, Jun 23, 2025 at 07:28:21PM +0900, Byungchul Park wrote:
On Mon, Jun 23, 2025 at 11:32:16AM +0200, David Hildenbrand wrote:
On 20.06.25 06:12, 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.

Introduce a network memory descriptor to store the members, struct
netmem_desc, and make it union'ed with the existing fields in struct
net_iov, allowing to organize the fields of struct net_iov.

It would be great adding some result from the previous discussions in
here, such as that the layout of "struct net_iov" can be changed because
it is not a "struct page" overlay, what the next steps based on this

I think the network folks already know how to use and interpret their
data struct, struct net_iov for sure.. but I will add the comment if it
you think is needed. Thanks for the comment.

I agree with David - it's not immediately obvious at first glance.
That was my feedback on the previous version as well :)

I think it'd be great to add that explanation, since this is where MM and
networking intersect.


I think a lot of people are now saying the same thing: (1) lets keep
net_iov and page/netmem_desc separate, and (2) lets add comments
explaining their relation so this intersection between MM and
networking is not confused in the long term .

For #1, concretely I would recommend removing the union inside struct
net_iov? And also revert all the changes to net_iov for that matter.

Without it the merge logistics will get more complicated than it
should be because of conflicts with changes in the io_uring tree.
It's a temporary solution, I'll convert once the series is merged
and reaches io_uring.

--
Pavel Begunkov