[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1454286240.7627.160.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Sun, 31 Jan 2016 16:24:00 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Tom Herbert <tom@...bertland.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
sowmini.varadhan@...cle.com, kernel-team@...com
Subject: Re: [PATCH net] net: Allow flow dissector to handle non 4-byte
aligned headers
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.
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.
Powered by blists - more mailing lists