ARM network trouble after recent mbuf changes

Warner Losh imp at bsdimp.com
Tue Aug 27 17:18:54 UTC 2013


On Aug 27, 2013, at 9:59 AM, Michael Tuexen wrote:

> On Aug 27, 2013, at 5:56 PM, Warner Losh <imp at bsdimp.com> wrote:
> 
>> 
>> On Aug 27, 2013, at 9:40 AM, Andrew Turner wrote:
>> 
>>> On Tue, 27 Aug 2013 07:26:03 -0600
>>> Warner Losh <imp at 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 at 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.
>> 
>> Wrong bug :)
>> 
>> Is it not a bug that __ILP32__ is undefined?
> Is it used anywhere? I only found __LP64__ being used...

_ILP32 is used in code we got from Solaris. Otherwise, you're right: we don't use it in the tree. Lots of places use __LP64__ though.

Warner


More information about the freebsd-arm mailing list