Subject: Re: Excess use of packed attribute

From: Ville Nuorvala <[email-masked]>
Date: Wed, 09 Aug 2006 22:17:56 +0300

David Miller wrote:
> From: Stephen Hemminger <[email-masked]>
> Date: Mon, 7 Aug 2006 13:34:23 -0700
> 
>> Silly offenders:	include/net/ipx.h
>> 			include/net/ieee80211.h
>> 			include/net/ip6_tunnel.h
>> 			include/net/ndisc.h
>> 			include/linux/if_ether.h
>> 			include/linux/if_fddi.h
>> 		
>> 			include/linux/sctp.h -- really bad
> 
> The ndisc.h one, for example, is needed for cases like ARM.
> 
> The if_ether.h one is also needed, or else for:
> 
> 	struct ethhdr *eth;
> 
> "eth + 1" would do the wrong thing as the compiler would
> align the structure to the native pointer size or similar.
> This is an issue because ethhdr is 14 bytes in size.

Similarly the ipv6_tlv_tnl_enc_lim in ip6_tunnel.h is a 3-octet IPv6
destination sub-option. The sub-option can be located anywhere inside
the destination option header and can only be found by parsing
the whole header.

Regards,
Ville