From: Eric Dumazet <eric.dumazet@gmail.com>
To: christoph.paasch@uclouvain.be
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, hkchu@google.com,
ilpo.jarvinen@helsinki.fi, jhs@mojatatu.com
Subject: Re: [PATCH net-next] tcp: unalias tcp_skb_cb flags and ip_dsfield
Date: Tue, 27 Sep 2011 11:23:29 +0200 [thread overview]
Message-ID: <1317115409.2541.6.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> (raw)
In-Reply-To: <201109271138.00318.christoph.paasch@uclouvain.be>
Le mardi 27 septembre 2011 à 11:38 +0300, Christoph Paasch a écrit :
> On Tuesday 27 September 2011 wrote David Miller:
> > From: Christoph Paasch <christoph.paasch@uclouvain.be>
> > Date: Tue, 27 Sep 2011 10:37:38 +0300
> >
> > > 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
next prev parent reply other threads:[~2011-09-27 9:23 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 6:02 [PATCH] tcp: ECN blackhole should not force quickack mode Eric Dumazet
2011-09-23 17:47 ` David Miller
2011-09-23 19:17 ` Ilpo Järvinen
2011-09-24 0:55 ` Jamal Hadi Salim
2011-09-25 19:24 ` Eric Dumazet
2011-09-26 1:07 ` jamal
2011-09-26 1:13 ` jamal
2011-09-26 8:26 ` Eric Dumazet
2011-09-26 12:00 ` jamal
2011-09-26 12:44 ` Eric Dumazet
2011-09-27 4:59 ` David Miller
2011-09-27 6:00 ` [PATCH net-next] tcp: unalias tcp_skb_cb flags and ip_dsfield Eric Dumazet
2011-09-27 6:20 ` David Miller
2011-09-27 7:37 ` Christoph Paasch
2011-09-27 8:01 ` Eric Dumazet
2011-09-27 8:08 ` David Miller
2011-09-27 8:38 ` Christoph Paasch
2011-09-27 9:23 ` Eric Dumazet [this message]
2011-09-27 9:28 ` Christoph Paasch
2011-09-27 9:40 ` Eric Dumazet
2011-09-27 9:51 ` [PATCH net-next] tcp: rename tcp_skb_cb flags Eric Dumazet
2011-09-27 17:25 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317115409.2541.6.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC \
--to=eric.dumazet@gmail.com \
--cc=christoph.paasch@uclouvain.be \
--cc=davem@davemloft.net \
--cc=hkchu@google.com \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=jhs@mojatatu.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox