From: Ajit Khaparde Date: Tue, 16 Feb 2010 20:25:43 +0000 (+0000) Subject: net: bug fix for vlan + gro issue X-Git-Tag: v2.6.34-rc1~233^2~186 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=e76b69cc0133952c98aa1ad6330cacacd269fd64;p=~emulex%2Finfiniband.git net: bug fix for vlan + gro issue Traffic (tcp) doesnot start on a vlan interface when gro is enabled. Even the tcp handshake was not taking place. This is because, the eth_type_trans call before the netif_receive_skb in napi_gro_finish() resets the skb->dev to napi->dev from the previously set vlan netdev interface. This causes the ip_route_input to drop the incoming packet considering it as a packet coming from a martian source. I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7. With this fix, the traffic starts and the test runs fine on both vlan and non-vlan interfaces. CC: Herbert Xu CC: Patrick McHardy Signed-off-by: Ajit Khaparde Signed-off-by: Herbert Xu Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index d1cf53d0d59..1968980f513 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2813,7 +2813,7 @@ gro_result_t napi_frags_finish(struct napi_struct *napi, struct sk_buff *skb, switch (ret) { case GRO_NORMAL: case GRO_HELD: - skb->protocol = eth_type_trans(skb, napi->dev); + skb->protocol = eth_type_trans(skb, skb->dev); if (ret == GRO_HELD) skb_gro_pull(skb, -ETH_HLEN);