From: David Miller <davem@davemloft.net>
To: Jason@zx2c4.com
Cc: dave.taht@gmail.com, netdev@vger.kernel.org,
linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
wireguard@lists.zx2c4.com
Subject: Re: Misalignment, MIPS, and ip_hdr(skb)->version
Date: Wed, 07 Dec 2016 19:37:16 -0500 (EST) [thread overview]
Message-ID: <20161207.193716.50344961208535056.davem@davemloft.net> (raw)
In-Reply-To: <CAHmME9qxz6wcOZuurqahXeY6QSF=zz0gH7gY4RZujLAJPNSWBA@mail.gmail.com>
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Thu, 8 Dec 2016 01:29:42 +0100
> On Wed, Dec 7, 2016 at 8:52 PM, David Miller <davem@davemloft.net> wrote:
>> The only truly difficult case to handle is GRE encapsulation. Is
>> that the situation you are running into?
>>
>> If not, please figure out what the header configuration looks like
>> in the case that hits for you, and what the originating device is
>> just in case it is a device driver issue.
>
> My case is my own driver and my own protocol, which uses a 13 byte
> header. I can, if absolutely necessary, change the protocol to add
> another byte of padding. Or I can choose not to decrypt in place but
> rather use a different trick, like overwriting the header during
> decryption, though this removes some of the scatterwalk optimizations
> when src and dst are the same. Or something else. I wrote the top
> email of this thread inquiring about just exactly how bad it is to
> call netif_rx(skb) when skb->data is unaligned.
You really have to land the IP header on a proper 4 byte boundary.
I would suggest pushing 3 dummy garbage bytes of padding at the front
or the end of your header.
next prev parent reply other threads:[~2016-12-08 0:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 18:35 Misalignment, MIPS, and ip_hdr(skb)->version Jason A. Donenfeld
2016-12-07 18:47 ` Dave Taht
2016-12-07 18:51 ` David Miller
2016-12-07 18:54 ` Jason A. Donenfeld
2016-12-07 19:52 ` David Miller
2016-12-08 0:29 ` Jason A. Donenfeld
2016-12-08 0:37 ` David Miller [this message]
2016-12-08 22:20 ` Jason A. Donenfeld
2016-12-08 23:14 ` David Miller
2016-12-11 8:07 ` Willy Tarreau
2016-12-11 10:47 ` Måns Rullgård
2016-12-10 12:25 ` Felix Fietkau
2016-12-10 13:25 ` Måns Rullgård
2016-12-10 20:09 ` Felix Fietkau
2016-12-10 20:32 ` Måns Rullgård
2016-12-10 20:36 ` Felix Fietkau
2016-12-12 16:19 ` David Laight
2016-12-12 16:31 ` Måns Rullgård
2016-12-08 0:30 ` Hannes Frederic Sowa
2016-12-08 4:34 ` Daniel Kahn Gillmor
2016-12-09 11:26 ` Jiri Benc
2016-12-10 22:18 ` Dan Lüdtke
2016-12-11 7:15 ` Greg KH
2016-12-11 14:50 ` Jason A. Donenfeld
2016-12-11 15:30 ` Andrew Lunn
2016-12-11 15:37 ` Jason A. Donenfeld
2016-12-11 16:44 ` Willy Tarreau
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=20161207.193716.50344961208535056.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Jason@zx2c4.com \
--cc=dave.taht@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=netdev@vger.kernel.org \
--cc=wireguard@lists.zx2c4.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).