Le mardi 27 septembre 2011 à 11:38 +0300, Christoph Paasch a écrit :
On Tuesday 27 September 2011 wrote David Miller:
quoted
From: Christoph Paasch <redacted>
Date: Tue, 27 Sep 2011 10:37:38 +0300
quoted
However, (as far as I can see) before Eric's change it was 42 bytes long
and now it became 43 bytes.
Then, I suggest that you go buy a pair of glasses. :-)
Yeah, maybe it's time to... ;-)
This two-byte hole, is it because "flags" and "sacked" are both __u8 and
fields are aligned to 32-bit ?
Not exactly.
Reason for the hole is the following :
struct whatever {
u8 first;
u8 second;
u32 third;
};
"third" field has an alignement requirement of 4 bytes on most arches.
Compiler inserts a 2 bytes hole before "third" to respect this
requirement.
There is no hole between "first" and "second", since second has no
alignment requirement.
sizeof(struct whatever) = 8