lkml.org 
[lkml]   [2023]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next v1 2/4] net: introduce abstraction for network memory
On Wed, 13 Dec 2023 18:05:25 -0800 Mina Almasry wrote:
> +struct netmem {
> + union {
> + struct page page;
> +
> + /* Stub to prevent compiler implicitly converting from page*
> + * to netmem_t* and vice versa.
> + *
> + * Other memory type(s) net stack would like to support
> + * can be added to this union.
> + */
> + void *addr;
> + };
> +};

My mind went to something like:

typedef unsigned long __bitwise netmem_ref;

instead. struct netmem does not exist, it's a handle which has
to be converted to a real type using a helper.

\
 
 \ /
  Last update: 2023-12-16 03:52    [W:0.202 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site