netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sri@us.ibm.com
Cc: herbert@gondor.apana.org.au, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] net: Handle vlan packets in skb_gso_segment()
Date: Tue, 02 Feb 2010 07:45:34 -0800 (PST)	[thread overview]
Message-ID: <20100202.074534.109997141.davem@davemloft.net> (raw)
In-Reply-To: <1264454194.28852.130.camel@w-sridhar.beaverton.ibm.com>

From: Sridhar Samudrala <sri@us.ibm.com>
Date: Mon, 25 Jan 2010 13:16:34 -0800

> 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@us.ibm.com>
 ...
> @@ -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);
>  

You can't do this.

Now, VLAN packets that are GSO handled will show up differently to
sniffers than those which do not get GSO handling.

You really can't pop the MAC header and modify the skb->protocol
here.

      reply	other threads:[~2010-02-02 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 21:16 [PATCH net-next-2.6] net: Handle vlan packets in skb_gso_segment() Sridhar Samudrala
2010-02-02 15:45 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100202.074534.109997141.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.org \
    --cc=sri@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).