gro: Normalise skb before bypassing GRO on netpoll VLAN path

Previous thread: [PATCH 2/2] be2net: fix for default setting of pause auto-negotiation by Ajit Khaparde on Monday, April 13, 2009 - 1:17 am. (2 messages)

Next thread: [PATCH] tg3: fix big endian MAC address collection failure by James Bottomley on Monday, April 13, 2009 - 8:29 am. (16 messages)
From: Herbert Xu
Date: Monday, April 13, 2009 - 7:41 am

Hi:

gro: Normalise skb before bypassing GRO on netpoll VLAN path

When we detect netpoll RX on the GRO VLAN path we bail out and
call the normal VLAN receive handler.  However, the packet needs
to be normalised by calling eth_type_trans since that's what the
normal path expects (normally the GRO path does the fixup).

This patch adds the necessary call to vlan_gro_frags.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 654e45f..c67fe6f 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -121,8 +121,10 @@ int vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
 	if (!skb)
 		return NET_RX_DROP;
 
-	if (netpoll_rx_on(skb))
+	if (netpoll_rx_on(skb)) {
+		skb->protocol = eth_type_trans(skb, skb->dev);
 		return vlan_hwaccel_receive_skb(skb, grp, vlan_tci);
+	}
 
 	return napi_frags_finish(napi, skb,
 				 vlan_gro_common(napi, grp, vlan_tci, skb));

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--

From: David Miller
Date: Monday, April 13, 2009 - 3:45 pm

From: Herbert Xu <herbert@gondor.apana.org.au>

Applied, thanks Herbert.
--

Previous thread: [PATCH 2/2] be2net: fix for default setting of pause auto-negotiation by Ajit Khaparde on Monday, April 13, 2009 - 1:17 am. (2 messages)

Next thread: [PATCH] tg3: fix big endian MAC address collection failure by James Bottomley on Monday, April 13, 2009 - 8:29 am. (16 messages)