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

From: Jakub Kicinski
Date: Wed Jan 10 2024 - 20:35:35 EST


On Wed, 10 Jan 2024 09:50:08 -0800 Shakeel Butt wrote:
> On Thu, Jan 4, 2024 at 1:44 PM Jakub Kicinski <kuba@xxxxxxxxxx> 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 struct
> encoded_page approach, but I don't have a strong opinion one way or
> the other. However it seems like you have a stronger preference for
> __bitwise approach. Is there a technical reason or just aesthetic?

Yes, right above the text you quoted:

The __bitwise annotation will make catching people trying
to cast to struct page * trivial.

https://lore.kernel.org/all/20240104134424.399fee0a@xxxxxxxxxx/