[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1264454194.28852.130.camel@w-sridhar.beaverton.ibm.com>
Date: Mon, 25 Jan 2010 13:16:34 -0800
From: Sridhar Samudrala <sri@...ibm.com>
To: David Miller <davem@...emloft.net>,
Herbert Xu <herbert@...dor.apana.org.au>
Cc: netdev <netdev@...r.kernel.org>
Subject: [PATCH net-next-2.6] net: Handle vlan packets in skb_gso_segment()
Handle VLAN packets in skb_gso_segment(). Currently, when large
VLAN packets are sent via virtio_net on guest and tun on host,
skb_gso_segment() fails with EPROTONOSUPPORT.
Signed-off-by: Sridhar Samudrala <sri@...ibm.com>
diff --git a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1672,6 +1672,12 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
skb_reset_mac_header(skb);
skb->mac_len = skb->network_header - skb->mac_header;
+ if (ntohs(type) == ETH_P_8021Q) {
+ skb->protocol = vlan_eth_hdr(skb)->h_vlan_encapsulated_proto;
+ type = skb->protocol;
+ skb->mac_len += VLAN_HLEN;
+ skb_set_network_header(skb, skb->mac_len);
+ }
__skb_pull(skb, skb->mac_len);
if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
--
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