lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100902095502.GA8775@ff.dom.local>
Date:	Thu, 2 Sep 2010 09:55:03 +0000
From:	Jarek Poplawski <jarkao2@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>, shemminger@...tta.com,
	herbert@...dor.apana.org.au, netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: don't do GRO on second port

On Thu, Sep 02, 2010 at 11:31:49AM +0200, Eric Dumazet wrote:
> Le jeudi 02 septembre 2010 ?? 08:33 +0000, Jarek Poplawski a écrit :
> > On Wed, Sep 01, 2010 at 02:51:51PM -0700, David Miller wrote:
> > > The only scenerio you can guarentee that all packets for a given
> > > flow key will be treated the same is the one where the input device
> > > is the same as well.
> > > 
> > > When there is a single napi --> device mapping, it works, but without
> > > that invariant it doesn't.
> > 
> > Do you mean a single napi can't be used eg. for vlan_gro and napi_gro?
> > (napi_gro handles flows for skb->dev different from napi->dev or I
> > miss something?)
> > 
> 
> Same napi can be used both for vlan tagged trafic and "non tagged
> trafic".
> 
> vlan_gro_common() does the right thing, when initializing skb->dev to
> the vlan device, before doing the GRO loop.
> 
> So if we receive two packets on same ethernet device, two different
> vlans, vlan_gro_common() automatically say they are not part of the same
> flow, even if upper layers would say "it's ok for these two packets to
> merge". Of course, we wont ask upper layers what they think :)
> 
> So we must keep the test against skb->dev, because of vlans,
> 
> diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev;
> 
> (both in vlan_gro_common() and __napi_gro_receive())
> 

Exactly, but there is no "a single napi --> device mapping". And sky2
uses the same model. So, there is only a question of cost of this test,
and a question of probability of gro errors on collisions without such
a test in normal use. (And if gro can never do such errors for other
reasons?)

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ