[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1283424105.2454.311.camel@edumazet-laptop>
Date: Thu, 02 Sep 2010 12:41:45 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jarek Poplawski <jarkao2@...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
Le jeudi 02 septembre 2010 à 09:55 +0000, Jarek Poplawski a écrit :
>
> 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?)
Two vlans might carry packets in different domains, with a clash of IP
space and TCP flows. Even with a probability of 0.000000001%, we cannot
ever merge two packets of different domains. Really !
napi->dev is not used in GRO path, as mentioned earlier,
but in napi_get_frags(), while not needed.
To make this very clear, I suggest following patch :
[PATCH net-next-2.6] gro: remove use of napi->dev
Only use of napi->dev in GRO stack is the one found in napi_get_frags()
We can remove it and use a plain dev_alloc_skb() call.
Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
---
net/core/dev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index d8c43e7..607057a 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3248,9 +3248,11 @@ struct sk_buff *napi_get_frags(struct napi_struct *napi)
struct sk_buff *skb = napi->skb;
if (!skb) {
- skb = netdev_alloc_skb_ip_align(napi->dev, GRO_MAX_HEAD);
- if (skb)
+ skb = dev_alloc_skb(GRO_MAX_HEAD + NET_IP_ALIGN);
+ if (skb) {
+ skb_reserve(skb, NET_IP_ALIGN);
napi->skb = skb;
+ }
}
return skb;
}
--
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