Re: [PATCH net-next v4 01/11] net: Allow const args for of page_to_netmem()

From: Mina Almasry
Date: Thu Jun 12 2025 - 00:53:18 EST


On Tue, Jun 10, 2025 at 8:15 AM Mark Bloch <mbloch@xxxxxxxxxx> wrote:
>
> From: Dragos Tatulea <dtatulea@xxxxxxxxxx>
>
> This allows calling page_to_netmem() with a const page * argument.
>
> Signed-off-by: Dragos Tatulea <dtatulea@xxxxxxxxxx>
> Reviewed-by: Cosmin Ratiu <cratiu@xxxxxxxxxx>
> Signed-off-by: Mark Bloch <mbloch@xxxxxxxxxx>

This is slightly better, it returns a const netmem_ref if const struct page:

https://lore.kernel.org/netdev/20250609043225.77229-6-byungchul@xxxxxx/

It's probably too much of a hassle to block your series until
Byungchul's change to this helper goes in for you, so this seems fine
to me in the interim.

Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>

--
Thanks,
Mina