From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] IP_t should be a "packed" struct
Date: Wed, 28 Jan 2009 23:27:47 +0100 [thread overview]
Message-ID: <20090128222747.CEBFD832E416@gemini.denx.de> (raw)
In-Reply-To: <b73e93990901281416k766b2bf3qc6429f77545f9191@mail.gmail.com>
Dear Luigi Mantellini,
In message <b73e93990901281416k766b2bf3qc6429f77545f9191@mail.gmail.com> you wrote:
>
> I think that an audit of the code is important to understand if we
> have a problem (or not) and how large is the problem.
We (i. e. all of us except you) do not have a problem.
> My compiler is not broken...
Well, YMMV...
> cassini linux # find -name \*.c -o -name \*.h |xargs grep attribute |
> grep packed | wc -l
> 3153
>
> I see a lot of packed structs...
> > Here is for example a copy of /usr/include/netinet/ip.h :
...
> This doesn't say anything regarding how kernel guys have resolved the
> problem (if they are solved...). Checking the kernel headers a lot
This is not a kernel header. This is one of the standard user space
network headers, and a pretty central one. Feel free to check any
others.
> I think that "struct packing" needs to be understood and a global
I agree on this. This definitely needs to be understood.
Hm... I think I understand it, and it works for me :-)
> mechanism should be used (like -fpack-struct option always defined or
> a style guideline that requires a tag for each structs). From my point
I think this is not needed. Please read the docuemntation about
alignment and padding. It is pretty clear.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"And it should be the law: If you use the word `paradigm' without
knowing what the dictionary says it means, you go to jail. No
exceptions." - David Jones @ Megatest Corporation
next prev parent reply other threads:[~2009-01-28 22:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-27 18:32 [U-Boot] IP_t should be a "packed" struct Luigi 'Comio' Mantellini
2009-01-28 9:42 ` Luigi 'Comio' Mantellini
2009-01-28 17:55 ` Ben Warren
2009-01-28 18:36 ` Jerry Van Baren
2009-01-28 18:58 ` Ben Warren
2009-01-28 20:40 ` Luigi Mantellini
2009-01-28 21:21 ` Ben Warren
2009-01-28 21:38 ` Wolfgang Denk
2009-01-28 21:52 ` Ben Warren
2009-01-28 22:21 ` Wolfgang Denk
2009-01-28 22:16 ` Luigi Mantellini
2009-01-28 22:27 ` Wolfgang Denk [this message]
2009-01-28 23:04 ` Luigi Mantellini
2009-01-29 10:20 ` Wolfgang Denk
2009-01-29 10:37 ` Alessandro Rubini
2009-01-28 20:58 ` Luigi Mantellini
2009-01-28 21:26 ` Wolfgang Denk
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=20090128222747.CEBFD832E416@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/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