From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH RFC] batman-adv: always assume 2-byte packet alignment
Date: Mon, 05 Mar 2018 07:32:35 +0100 [thread overview]
Message-ID: <2065896.eJjkvJvhLt@sven-edge> (raw)
In-Reply-To: <0272f809d25b41fcab4ec5c4b66014f5e341d424.1516792897.git.mschiffer@universe-factory.net>
[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]
On Mittwoch, 24. Januar 2018 12:21:37 CET Matthias Schiffer wrote:
> NIC drivers generally try to ensure that the "network header" is aligned
> to a 4-byte boundary. This is not always possible: When Ethernet frames are
> encapsulated in other packets with 4-byte aligned headers, the inner
> Ethernet header will have 4-byte alignment, and in consequence, the inner
> network header is aligned to 2, but not to 4 bytes.
>
> Most parts of batman-adv only care about 2-byte alignment; in particular,
> no unaligned accesses occur in performance-critical paths that handle
> actual payload data. This is not true for OGM handling: the seqno and crc
> fields are accessed as 32-bit values. To avoid these unaligned accesses,
> this patch reduces the expected packet alignment to 2 bytes for all of
> batadv's packet types.
>
> As no unaligned accesses existed on the performance-critical paths anyways,
> this chance does have any (positive or negative) effect on performance, but
> it still makes sense to avoid these accesses to prevent log noise when
> examining other unaligned accesses in the kernel while batman-adv is
> active.
>
> Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
> ---
> include/uapi/linux/batadv_packet.h | 13 ++-----------
> 1 file changed, 2 insertions(+), 11 deletions(-)
As discussed earlier, this was applied as 0509fc0c128b [1] after David Miller
pulled it in net-next.
Kind regards,
Sven
[1] https://git.open-mesh.org/batman-adv.git/commit/0509fc0c128ba2891770305c57c9b6a3a61ea7bd
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-03-05 6:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 11:21 [B.A.T.M.A.N.] [PATCH RFC] batman-adv: always assume 2-byte packet alignment Matthias Schiffer
2018-01-24 13:40 ` [B.A.T.M.A.N.] [RFC] " Sven Eckelmann
2018-01-24 13:40 ` Sven Eckelmann
2018-02-03 8:40 ` [B.A.T.M.A.N.] " Sven Eckelmann
2018-03-05 6:32 ` Sven Eckelmann [this message]
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=2065896.eJjkvJvhLt@sven-edge \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.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.