Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2013 16:40:55 +0100
From:      Andrew Turner <andrew@fubar.geek.nz>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-arm <freebsd-arm@FreeBSD.org>, Andre Oppermann <andre@freebsd.org>
Subject:   Re: ARM network trouble after recent mbuf changes
Message-ID:  <20130827164055.4a757a13@bender>
In-Reply-To: <DD3D1045-535F-4593-A3B4-E33CFECF0818@bsdimp.com>
References:  <1377550636.1111.156.camel@revolution.hippie.lan> <521BC472.7040804@freebsd.org> <521BD531.4090104@sbcglobal.net> <521C4CD9.4050308@freebsd.org> <20130827102810.37e2dfc7@bender> <DD3D1045-535F-4593-A3B4-E33CFECF0818@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 27 Aug 2013 07:26:03 -0600
Warner Losh <imp@bsdimp.com> wrote:

> 
> On Aug 27, 2013, at 3:28 AM, Andrew Turner wrote:
> 
> > On Tue, 27 Aug 2013 08:53:13 +0200
> > Andre Oppermann <andre@freebsd.org> wrote:
> >> Please try the patch below to confirm.  If it fixes your problem
> >> for now I'm going to commit as an immediate fix while searching
> >> for a better long term stable solution.
> >> 
> > 
> > I tried this with a CTASSERT to check if struct m_hdr is the correct
> > length. In this test the size is incorrect. It appears __ILP32__ is
> > not defined on ARM.
> > 
> > I have tested a fix suggested by Hans Petter Selasky where we mark
> > m_hdr with __aligned(8). With this change I can netboot a
> > PandaBoard.
> 
> Isn't that a bug with our arm compiler then?

No, on ARM EABI the definition of the size of a struct is to be the
smallest multiple of its alignment. As we are increasing the alignment
to 8-byte and the struct without this alignment is not a multiple of
8-bytes adding this alignment will pad to struct to use the unused 4
bytes between this and the next struct.

Andrew
> 
> Warner
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130827164055.4a757a13>