ARM network trouble after recent mbuf changes

Michael Tuexen tuexen at freebsd.org
Tue Aug 27 15:12:31 UTC 2013


On Aug 27, 2013, at 4:23 PM, Andre Oppermann <andre at FreeBSD.org> wrote:

> On 27.08.2013 15:29, Michael Tuexen wrote:
>> On Aug 27, 2013, at 1:05 PM, Andre Oppermann <andre at FreeBSD.org> wrote:
>>> Thanks.  I've changed the test accordingly.
>>> 
>>> While doing the CTASSERTs to prevent such an incident in the future I stumbled
>>> across a bit of evil name space pollution in mbuf.h.  It is impossible to take
>>> sizeof(struct m_ext) because "m_ext" is redefined to point into struct mbuf.
>>> 
>>> In addition to the alignment fix I've solved the namespace issues with m_ext
>>> and the stupidly named struct pkthdr as well and properly prefixed them.  The
>>> fallout from LINT was zero (as it should be).
>>> 
>>> http://people.freebsd.org/~andre/m_hdr-alignment-20130827.diff
>>> 
>>> Please test.
> >
>> Done. r254954 with your patch applied runs fine on a RPi.
> 
> Does the CTASSERT trigger if the padding in m_hdr is not there?
Yepp:

/usr/home/tuexen/head/sys/kern/uipc_mbuf.c:91:1: error: static_assert failed "compile-time assertion failed"
CTASSERT(sizeof(struct mbuf) == MSIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/home/tuexen/head/sys/sys/systm.h:100:21: note: expanded from macro 'CTASSERT'
#define CTASSERT(x)     _Static_assert(x, "compile-time assertion failed")
                        ^              ~
1 error generated.

Best regards
Michael
> 
> -- 
> Andre
> 
> 



More information about the freebsd-arm mailing list