public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Andy Gay <andy@andynet.net>
Cc: netdev@vger.kernel.org
Subject: Re: [IPROUTE]: Fix struct alignment with cris architecture
Date: Fri, 11 Aug 2006 09:45:04 -0700	[thread overview]
Message-ID: <20060811094504.45c9ab31@localhost.localdomain> (raw)
In-Reply-To: <1155255940.7302.18.camel@tahini.andynet.net>

On Thu, 10 Aug 2006 20:25:40 -0400
Andy Gay <andy@andynet.net> wrote:

> [IPROUTE]: Fix struct alignment with cris architecture
> 
> gcc for the cris arch does not pad structures to the next multiple of 4
> bytes, as the i386 gcc does.
> 
> This causes errors like this when displaying xfrm policies:
> 
> # ip x p
> !!!Deficit 3, rta_len=300
> src 192.168.251.32/29 dst 192.168.251.32/29 
>         dir in priority 0 
> !!!Deficit 3, rta_len=180
> src 0.0.0.0/0 dst 192.168.251.32/29 
>         dir in priority 2208 
> ....
> 
> Similar errors are seen from ip x s.
> 
> This patch fixes the errors when printing. I'm not sure whether we
> should worry about other uses of the affected structs, I've not seen any
> other bad effects from this though, so hopefully this is enough.
> 
> (Thanks to Herbert Xu for pointing out that NLMSG_SPACE is the correct
> macro to use here.)
> 
> Tested against 2.6.17.6 kernel on i386, and 2.6.16.1 kernel on cris.
> 
> Signed-off-by: Andy Gay <andy@andynet.net>

Applied

      reply	other threads:[~2006-08-11 16:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-11  0:25 [IPROUTE]: Fix struct alignment with cris architecture Andy Gay
2006-08-11 16:45 ` Stephen Hemminger [this message]

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=20060811094504.45c9ab31@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=andy@andynet.net \
    --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