[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201109271228.44232.christoph.paasch@uclouvain.be>
Date: Tue, 27 Sep 2011 12:28:44 +0300
From: Christoph Paasch <christoph.paasch@...ouvain.be>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
hkchu@...gle.com, ilpo.jarvinen@...sinki.fi, jhs@...atatu.com
Subject: Re: [PATCH net-next] tcp: unalias tcp_skb_cb flags and ip_dsfield
Eric,
On Tuesday 27 September 2011 wrote Eric Dumazet:
> Le mardi 27 septembre 2011 à 11:38 +0300, Christoph Paasch a écrit :
> > On Tuesday 27 September 2011 wrote David Miller:
> > 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
Ok, I understand.
Thanks for the info. I didn't knew this...
It's good news...
Maybe we win now a little bit of space in MultiPath TCP by rearranging our
fields... :-)
Cheers,
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists