From: Antonio Quartulli <antonio@meshcoding.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
Marek Lindner <mareklindner@neomailbox.ch>
Subject: Re: [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv
Date: Sun, 01 Dec 2013 01:27:34 +0100 [thread overview]
Message-ID: <529A8276.9060002@meshcoding.com> (raw)
In-Reply-To: <20131130230518.GC16735@n2100.arm.linux.org.uk>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/12/13 00:05, Russell King - ARM Linux wrote:
> On Sat, Nov 30, 2013 at 09:12:52PM +0100, Antonio Quartulli wrote:
>> I don't know the ARM architecture at all (I don't know if the
>> other batman-adv developers do), so could you please provide here
>> some more details about why that static check is failing? We
>> would like to address this issue differently rather than
>> re-adding the __packed attribute.
>
> The reason is this struct becomes a size of 4 bytes, even though it
> only contains three uint8_t members. This offsets the members of
> all structs that this struct is embedded in.
>
> If you don't wish to fix this, then please make your subsystem
> depend on !ARM because it's otherwise impossible to fix and can
> never work on ARM.
>
I'd like to fix this.
Actually I can't really understand your explanation: struct
batadv_header is always used inside another parent structure and the
latter always has a uint8_t following the batadv_header, thus filling
that gap and aligning it to 4bytes.
I think this is also why we don't get this compiler error on any other
architecture. Or am I missing something?
I'll install a toolchain for ARM and I'll try to inspect it better. If
we have to make a change we should do it before 3.13 is release since
this change could possibly alter the packet layout.
- --
Antonio Quartulli
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iEYEARECAAYFAlKagnYACgkQpGgxIkP9cwe1KgCeMUkV6xpNOsM4Bilc1e1uHpCG
8BAAnjsHJ/AHn8COhwiZ5wrKiIpQ0CFa
=D4xa
-----END PGP SIGNATURE-----
WARNING: multiple messages have this Message-ID (diff)
From: Antonio Quartulli <antonio-x4xJYDvStAgysxA8WJXlww@public.gmane.org>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Marek Lindner
<mareklindner-rVWd3aGhH2z5bpWLKbzFeg@public.gmane.org>
Subject: Re: [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv
Date: Sun, 01 Dec 2013 01:27:34 +0100 [thread overview]
Message-ID: <529A8276.9060002@meshcoding.com> (raw)
In-Reply-To: <20131130230518.GC16735-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/12/13 00:05, Russell King - ARM Linux wrote:
> On Sat, Nov 30, 2013 at 09:12:52PM +0100, Antonio Quartulli wrote:
>> I don't know the ARM architecture at all (I don't know if the
>> other batman-adv developers do), so could you please provide here
>> some more details about why that static check is failing? We
>> would like to address this issue differently rather than
>> re-adding the __packed attribute.
>
> The reason is this struct becomes a size of 4 bytes, even though it
> only contains three uint8_t members. This offsets the members of
> all structs that this struct is embedded in.
>
> If you don't wish to fix this, then please make your subsystem
> depend on !ARM because it's otherwise impossible to fix and can
> never work on ARM.
>
I'd like to fix this.
Actually I can't really understand your explanation: struct
batadv_header is always used inside another parent structure and the
latter always has a uint8_t following the batadv_header, thus filling
that gap and aligning it to 4bytes.
I think this is also why we don't get this compiler error on any other
architecture. Or am I missing something?
I'll install a toolchain for ARM and I'll try to inspect it better. If
we have to make a change we should do it before 3.13 is release since
this change could possibly alter the packet layout.
- --
Antonio Quartulli
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iEYEARECAAYFAlKagnYACgkQpGgxIkP9cwe1KgCeMUkV6xpNOsM4Bilc1e1uHpCG
8BAAnjsHJ/AHn8COhwiZ5wrKiIpQ0CFa
=D4xa
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-12-01 0:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 19:15 [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv Russell King - ARM Linux
2013-11-30 19:15 ` Russell King - ARM Linux
2013-11-30 20:12 ` [B.A.T.M.A.N.] " Antonio Quartulli
2013-11-30 20:12 ` Antonio Quartulli
2013-11-30 23:05 ` [B.A.T.M.A.N.] " Russell King - ARM Linux
2013-11-30 23:05 ` Russell King - ARM Linux
2013-12-01 0:27 ` Antonio Quartulli [this message]
2013-12-01 0:27 ` Antonio Quartulli
2013-12-01 14:28 ` [B.A.T.M.A.N.] " Antonio Quartulli
2013-12-01 14:28 ` Antonio Quartulli
2013-12-01 17:13 ` Russell King - ARM Linux
2013-12-01 17:13 ` Russell King - ARM Linux
2013-12-02 10:24 ` [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors withbatman-adv David Laight
2013-12-02 10:24 ` David Laight
2013-12-02 12:50 ` Antonio Quartulli
2013-12-02 12:50 ` Antonio Quartulli
2013-12-02 13:10 ` David Laight
2013-12-02 13:10 ` David Laight
2013-12-02 16:20 ` David Miller
2013-12-02 16:20 ` David Miller
2013-12-01 19:21 ` [B.A.T.M.A.N.] [PATCH] Fix ARM BUILD_BUG_ON() errors with batman-adv David Miller
2013-12-01 19:21 ` David Miller
2013-12-01 20:40 ` [B.A.T.M.A.N.] " Antonio Quartulli
2013-11-30 21:05 ` David Miller
2013-11-30 21:05 ` David Miller
2013-11-30 23:03 ` [B.A.T.M.A.N.] " Russell King - ARM Linux
2013-11-30 23:03 ` Russell King - ARM Linux
2013-12-02 17:58 ` [B.A.T.M.A.N.] " Simon Wunderlich
2013-12-02 17:58 ` Simon Wunderlich
2013-12-02 18:38 ` [B.A.T.M.A.N.] " David Miller
2013-12-02 18:38 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=529A8276.9060002@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=mareklindner@neomailbox.ch \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.