From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vladislav Zolotarov <vladz@broadcom.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Patrick McHardy <kaber@trash.net>,
Pedro Garcia <pedro.netdev@dondevamos.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Ben Hutchings <bhutchings@solarflare.com>
Subject: RE: [PATCH] vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)
Date: Thu, 17 Jun 2010 12:28:38 +0200 [thread overview]
Message-ID: <1276770518.2519.1.camel@edumazet-laptop> (raw)
In-Reply-To: <8628FE4E7912BF47A96AE7DD7BAC0AADDDC69DDE7E@SJEXCHCCR02.corp.ad.broadcom.com>
Le jeudi 17 juin 2010 à 01:56 -0700, Vladislav Zolotarov a écrit :
>
> > -----Original Message-----
> > From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] On
> > Behalf Of Eric Dumazet
> > Sent: Wednesday, June 16, 2010 9:58 PM
> > To: Arnd Bergmann
> > Cc: Patrick McHardy; Pedro Garcia; netdev@vger.kernel.org; Ben Hutchings
> > Subject: Re: [PATCH] vlan_dev: VLAN 0 should be treated as "no vlan tag"
> > (802.1p packet)
> >
> > Le mercredi 16 juin 2010 à 20:26 +0200, Arnd Bergmann a écrit :
> > > On Wednesday 16 June 2010 17:28:23 Patrick McHardy wrote:
> > >
> > > > Since we don't have any special VLAN handling in the bridging code, I
> > > > guess it comes down to optionally using a different ethertype value
> > > > (0x88a8) in the VLAN code. We probably also need some indication from
> > > > device drivers whether they are able to add these headers to avoid
> > > > trying to offload tagging in case they're not.
> > >
> > > It's probably a little more than just supporting the new ethertype, but not
> > > much. The outer tag can be handled like our current VLAN module does,
> > > but the standard does not allow a regular frame to be encapsulated
> > directly,
> > > but rather requires one of
> > >
> > > 1. In 802.1ad: an 802.1Q VLAN tag (ethertype 0x8100) followed by the frame
> > > 2. In 802.1ah: A service tag (ethertype 0x88e7) followed by the 802.1Q VLAN
> > tag
> > > and then the frame.
> > >
> > > Maybe what we can do is extend the vlan code to understand all three frame
> > > formats (q, ad and ah) or at least the first two so we configure both the
> > > provider VID and the Customer VID for the interface in case of 802.1ad but
> > > only the regular VID in 802.1Q.
> > >
> > > Device drivers can then flag whether they support both formats or just
> > > the regular Q tag.
> > >
> > > Arnd
> >
> > Speaking of device drivers, I see bnx2 (hardware accelerated) is able to
> > insert a 8021q tag in case no vlgrp is defined (the 8201q tag that was
> > removed by NIC)... interesting ping pong games, since our 8021q stack
> > will remove it again, eventually.
> >
> > So VLAN 0 'problem' on bnx2 could be solved with following patch
> > (avoiding this insert if vtag==0)
> >
> >
> >
> > diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
> > index 522de9f..b5d4d05 100644
> > --- a/drivers/net/bnx2.c
> > +++ b/drivers/net/bnx2.c
> > @@ -3192,7 +3192,7 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi,
> > int budget)
> > hw_vlan = 1;
> > else
> > #endif
> > - {
> > + if (vtag) {
> > struct vlan_ethhdr *ve = (struct vlan_ethhdr *)
> > __skb_push(skb, 4);
> >
> >
> >
> > --
>
> This way u will loose all the priority information that was on the VLAN header.
16bits vtag = 0 : there is no priority information.
next prev parent reply other threads:[~2010-06-17 10:28 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 19:20 [PATCH] vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet) Pedro Garcia
2010-06-13 21:56 ` Ben Hutchings
2010-06-14 16:49 ` Pedro Garcia
2010-06-14 17:02 ` Ben Hutchings
2010-06-14 17:11 ` Patrick McHardy
2010-06-14 19:12 ` Eric Dumazet
2010-06-16 8:49 ` Pedro Garcia
2010-06-16 9:08 ` Eric Dumazet
2010-06-16 11:42 ` Patrick McHardy
2010-06-16 13:28 ` Pedro Garcia
2010-06-16 14:24 ` Arnd Bergmann
2010-06-16 15:28 ` Patrick McHardy
2010-06-16 18:26 ` Arnd Bergmann
2010-06-16 18:58 ` Eric Dumazet
2010-06-17 8:56 ` Vladislav Zolotarov
2010-06-17 10:28 ` Eric Dumazet [this message]
2010-06-17 14:08 ` Vladislav Zolotarov
2010-06-16 14:24 ` Eric Dumazet
2010-06-27 23:21 ` Pedro Garcia
2010-06-30 20:16 ` David Miller
2010-07-01 18:47 ` Pedro Garcia
2010-07-01 20:19 ` Eric Dumazet
2010-07-18 16:43 ` Pedro Garcia
2010-07-18 22:39 ` David Miller
2010-07-19 13:24 ` [BUG net-next-2.6] vlan, bonding, bnx2 problems Eric Dumazet
2010-07-19 16:35 ` David Miller
2010-07-19 18:14 ` Michael Chan
2010-07-19 20:19 ` Jay Vosburgh
2010-07-20 22:58 ` Jay Vosburgh
2010-06-24 18:28 ` [PATCH] vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet) Pedro Garcia Pelaez
2010-07-08 12:54 ` Vladislav Zolotarov
2010-07-08 12:58 ` Vladislav Zolotarov
2010-07-08 13:51 ` Vladislav Zolotarov
2010-06-14 19:42 ` Joe Perches
2010-06-14 20:03 ` Eric Dumazet
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=1276770518.2519.1.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=arnd@arndb.de \
--cc=bhutchings@solarflare.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=pedro.netdev@dondevamos.com \
--cc=vladz@broadcom.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