netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: benny+usenet@amorsen.dk, gertjan_hofman@yahoo.com,
	mcarlson@broadcom.com, netdev@vger.kernel.org, kaber@trash.net
Subject: Re: [PATCH] vlan: allow VLAN ID 0 to be used
Date: Mon, 26 Oct 2009 17:32:32 -0700 (PDT)	[thread overview]
Message-ID: <20091026.173232.33817336.davem@davemloft.net> (raw)
In-Reply-To: <4AE5CAC6.4000604@gmail.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 26 Oct 2009 17:13:58 +0100

> [PATCH] vlan: allow VLAN ID 0 to be used
> 
> We currently use a 16 bit field (vlan_tci) to store VLAN ID on a skb.
> 
> 0 value is used a special value, meaning VLAN ID not set.
> This forbids use of VLAN ID 0
> 
> As VLAN ID is 12 bits, we can use high order bit as a flag, and
> allow VLAN ID 0
> 
> Reported-by: Gertjan Hofman <gertjan_hofman@yahoo.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

This is going to need some more work.

IXGBE is already using the higher bits of ->vlan_tci internally,
your change breaks that.

QLGE explicitly initializes skb->vlan_tci to zero, you'll need to make
sure that's OK.

There is an explicit "if (skb->vlan_tci" (ie. zero vs. non-zero) test
in net/core/dev.c:netif_receive_skb()

net/core/skbuff.c:__copy_skb_header() does a straight copy, you'll
need to make sure that's still OK.

net/packet/af_packet.c:tpacket_rcv() and packet_recvmsg() report the
skb->vlan_tci value to userspace, that's broken now as userspace
doesn't expect that new bit to be there.

  reply	other threads:[~2009-10-27  0:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26  4:30 VLAN and ARP failure on tg3 drivers Gertjan Hofman
2009-10-26  8:20 ` Benny Amorsen
2009-10-26  8:54   ` Eric Dumazet
2009-10-26 16:13     ` [PATCH] vlan: allow VLAN ID 0 to be used Eric Dumazet
2009-10-27  0:32       ` David Miller [this message]
2009-10-27  1:34         ` Eric Dumazet
2009-10-27  1:41           ` David Miller
2009-10-27  9:52       ` Benny Amorsen
2009-10-27 10:02         ` Eric Dumazet
2009-10-28 16:13           ` Patrick McHardy

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=20091026.173232.33817336.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=benny+usenet@amorsen.dk \
    --cc=eric.dumazet@gmail.com \
    --cc=gertjan_hofman@yahoo.com \
    --cc=kaber@trash.net \
    --cc=mcarlson@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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).