From: Florian Fainelli <f.fainelli@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>, Tom Herbert <tom@herbertland.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
sowmini.varadhan@oracle.com, kernel-team@fb.com
Subject: Re: [PATCH net] net: Allow flow dissector to handle non 4-byte aligned headers
Date: Sun, 31 Jan 2016 16:39:35 -0800 [thread overview]
Message-ID: <56AEA947.409@gmail.com> (raw)
In-Reply-To: <1454286240.7627.160.camel@edumazet-glaptop2.roam.corp.google.com>
Le 31/01/2016 16:24, Eric Dumazet a écrit :
> On Sun, 2016-01-31 at 13:37 -0800, Tom Herbert wrote:
>> Call get_unaligned_be32 when we access 32-bit fields in
>> __skb_flow_dissect. At the beginning check for unlikely case of
>> 1-byte aligned packet.
>>
>> Note that flow_dissector may be asked to parse packet unaligned
>> fields in two instances:
>>
>> 1) Packet from a driver which is aligned to Ethernet header
>> (2-byte alignment)
>> 2) Parsing inner headers of a received GRE-TEB packet
>>
>> Testing: Ran super_netperf tests did not see a regression. This was on
>> x86 which does not have problems with unaligned data.
>
> But this test is absolutely useless, what about testing arches that
> actually care ?
>
> I am told all these MIPS based boxes have already not enough cpu power.
How about the Cavium OCTEON family and Broadcom/Netlogic XLR/XLP, those
are massively multi-core and MIPS64 capable, even though they may not
always run a Linux networking stack, some do.
There are also plenty of ARMv7/ARMv8 devices out there that would
benefit from proper alignment some might end-up using mlx4/5 and intel
cards.
>
> It is sad, because none of them use the drivers that might call flow
> dissection (mlx4 and 4 intel drivers)
>
> So I would rather fix the cases where flow dissection called from
> eth_get_headlen() with non aligned stuff.
>
> And maybe restrict GRE-TEB to platforms with
> CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y, since otherwise we need to add
> these unaligned macros in thousands of places in our stacks.
>
>
>
--
Florian
next prev parent reply other threads:[~2016-02-01 0:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-31 21:37 [PATCH net] net: Allow flow dissector to handle non 4-byte aligned headers Tom Herbert
2016-01-31 21:47 ` kbuild test robot
2016-01-31 22:06 ` Florian Westphal
2016-02-01 0:24 ` Eric Dumazet
2016-02-01 0:39 ` Florian Fainelli [this message]
2016-02-01 15:20 ` Nicolas Dichtel
2016-02-01 16:01 ` Sowmini Varadhan
2016-02-01 0:43 ` Sowmini Varadhan
2016-02-01 12:32 ` Sergei Shtylyov
2016-02-02 0:31 ` Sowmini Varadhan
2016-02-02 0:46 ` Tom Herbert
2016-02-02 3:56 ` Alexander Duyck
2016-02-02 13:41 ` Hannes Frederic Sowa
2016-02-02 18:35 ` Sowmini Varadhan
2016-02-03 17:07 ` Tom Herbert
2016-02-03 17:31 ` Sowmini Varadhan
2016-02-03 17:51 ` Tom Herbert
2016-02-03 17:59 ` Sowmini Varadhan
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=56AEA947.409@gmail.com \
--to=f.fainelli@gmail.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=sowmini.varadhan@oracle.com \
--cc=tom@herbertland.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).