lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231026090424.73a49f35@kernel.org>
Date: Thu, 26 Oct 2023 09:04:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vincent Bernat <vincent@...nat.ch>
Cc: Alce Lafranque <alce@...ranque.net>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
 <pabeni@...hat.com>, David Ahern <dsahern@...nel.org>, Ido Schimmel
 <idosch@...dia.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v7] vxlan: add support for flowlabel inherit

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ