IPv6 APIs rework

Stephen Hemminger stephen at networkplumber.org
Sat Jul 20 22:26:19 CEST 2024


On Sat, 20 Jul 2024 19:43:45 +0200
"Robin Jarry" <rjarry at redhat.com> wrote:

> Cutting down the quoting a bit.
> 
> I understand the arguments against having an unaligned packed struct. 
> But it is precisely what we have in the current code base. All IPv6 
> addresses are uint8_t[16] arrays. And nobody ever complained about it.
> 
> Since this rework is already massive, could we proceed in steps?
> 
> First, I can replace all uint8_t[16] arrays by an unaligned packed 
> struct which is 99% of the work.
> 
> Second, *if there is a real and measurable performance gain*, change 
> that structure to remove explicit alignment.
> 
> Does this sound like a good plan to everyone?
> 

There is no need for packing or alignment in in6_addr or current DPDK,
what would be the benefit?  Compilers generate worse code if a structure
is marked packed.


More information about the dev mailing list