Subject: Re: [PATCH net-next v7] vxlan: add support for flowlabel inherit

From: Jakub Kicinski <[email-masked]>
Date: Thu, 26 Oct 2023 09:04:24 -0700

On Thu, 26 Oct 2023 17:53:22 +0200 Vincent Bernat wrote:
> >> +	enum ifla_vxlan_label_policy	label_policy;  
> > 
> > Here, OTOH, you could save some space, by making it a u8.  
> 
> Is it worth it?

I'm just pointing out the irony of trying to save space in netlink,
where everything is aligned to 4B, and not trying where it may actually
matter :)

> Keeping an enum helps the compiler catching some 
> mistakes and it documents a bit the code (we could put a comment 
> instead). In most cases, there is not a lot of vlan_config structs lying 
> around (when there are many VXLAN devices, people use single VXLAN 
> devices), so it shouldn't be a problem for memory or cache.

Pretty sure the single switch statement will be just fine without 
to compiler helping us. Plus we won't have to re-align the struct :S

> Alternatively, we could push this to another patch that would also 
> handle df field.

Meh.