From owner-freebsd-arm@FreeBSD.ORG Mon Aug 26 22:38:42 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1CE8E6F3; Mon, 26 Aug 2013 22:38:42 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A07D32647; Mon, 26 Aug 2013 22:38:41 +0000 (UTC) Received: from [192.168.1.200] (p508F3DB2.dip0.t-ipconnect.de [80.143.61.178]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 232701C0C0692; Tue, 27 Aug 2013 00:38:37 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: ARM network trouble after recent mbuf changes From: Michael Tuexen In-Reply-To: <521BD531.4090104@sbcglobal.net> Date: Tue, 27 Aug 2013 00:38:35 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1377550636.1111.156.camel@revolution.hippie.lan> <521BC472.7040804@freebsd.org> <521BD531.4090104@sbcglobal.net> To: Thomas Skibo X-Mailer: Apple Mail (2.1508) Cc: freebsd-arm , Andre Oppermann X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 22:38:42 -0000 I did some tests with a small program. Having in struct pkthdr 64 bit = entities results in a 64 bit alignment when used in struct mbuf. Using __packed for struct mbuf, removes the padding. Best regards Michael On Aug 27, 2013, at 12:22 AM, Thomas Skibo = wrote: >=20 >=20 > On 8/26/13 2:11 PM, Andre Oppermann wrote: >>=20 >> Can you try this patch see check if it makes a difference on the = bitfield? >>=20 >=20 > Actually, this works for me. But, I'm worried that somewhere else = something is going to trip over a struct pkthdr not being 64-bit = aligned. There are several 64-bit fields in there. >=20 >=20 > --Thomas >=20 > root@ashbury:/usr/src/sys/sys # svn diff mbuf.h > Index: mbuf.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- mbuf.h (revision 254889) > +++ mbuf.h (working copy) > @@ -94,7 +94,7 @@ > int32_t mh_len; /* amount of data in this mbuf = */ > uint32_t mh_type:8, /* type of data in this mbuf */ > mh_flags:24; /* flags; see below */ > -}; > +} __packed; >=20 > /* > * Packet tag structure (see below for details). > @@ -169,7 +169,7 @@ > (struct mbuf *, void *, void *); > void *ext_arg1; /* optional argument pointer */ > void *ext_arg2; /* optional argument pointer */ > -}; > +} __packed; >=20 > /* > * The core of the mbuf object along with some shortcut defines for = practical > @@ -187,7 +187,7 @@ > } MH; > char M_databuf[MLEN]; /* !M_PKTHDR, = !M_EXT */ > } M_dat; > -}; > +} __packed; > #define m_next m_hdr.mh_next > #define m_len m_hdr.mh_len >=20 >=20 > --=20 > -------- > Thomas Skibo > ThomasSkibo@sbcglobal.net >=20 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >=20