Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2013 17:12:28 +0200
From:      Michael Tuexen <tuexen@freebsd.org>
To:        Andre Oppermann <andre@FreeBSD.org>
Cc:        freebsd-arm <freebsd-arm@FreeBSD.org>
Subject:   Re: ARM network trouble after recent mbuf changes
Message-ID:  <85F67DE2-701E-464B-8A9D-6A47C3B6C461@freebsd.org>
In-Reply-To: <521CB66B.9020806@freebsd.org>
References:  <1377550636.1111.156.camel@revolution.hippie.lan> <521BC472.7040804@freebsd.org> <521BD531.4090104@sbcglobal.net> <521C4CD9.4050308@freebsd.org> <0E0536B2-2B7F-4EED-9EFD-4B9E2C2D729A@freebsd.org> <521C87FF.8010100@freebsd.org> <D2FB4EEE-DE17-43CB-9E77-7BCA7D1B9661@freebsd.org> <521CB66B.9020806@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 27, 2013, at 4:23 PM, Andre Oppermann <andre@FreeBSD.org> wrote:

> On 27.08.2013 15:29, Michael Tuexen wrote:
>> On Aug 27, 2013, at 1:05 PM, Andre Oppermann <andre@FreeBSD.org> =
wrote:
>>> Thanks.  I've changed the test accordingly.
>>>=20
>>> 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.
>>>=20
>>> 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).
>>>=20
>>> http://people.freebsd.org/~andre/m_hdr-alignment-20130827.diff
>>>=20
>>> Please test.
> >
>> Done. r254954 with your patch applied runs fine on a RPi.
>=20
> 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) =3D=3D 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
>=20
> --=20
> Andre
>=20
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?85F67DE2-701E-464B-8A9D-6A47C3B6C461>