netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Ben Greear <greearb@candelatech.com>
Cc: Patrick McHardy <kaber@trash.net>,
	David Miller <davem@davemloft.net>,
	djohnson+linux-kernel@sw.starentnetworks.com,
	jes@trained-monkey.org, mchan@broadcom.com,
	ram.vepa@neterion.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, bguo@sw.starentnetworks.com
Subject: Re: [PATCH 1/2] NET: Re-add VLAN tag for devices incapable of keeping it
Date: Tue, 06 Nov 2007 21:08:21 +0100	[thread overview]
Message-ID: <m3fxzj3znu.fsf@maximus.localdomain> (raw)
In-Reply-To: <4730B8ED.7020301@candelatech.com> (Ben Greear's message of "Tue, 06 Nov 2007 10:56:45 -0800")

Ben Greear <greearb@candelatech.com> writes:

> Bridging eth0 to eth1 should not pay attention to VLAN tags
> at all (if the pkt comes in on VLAN 7, it should go out on VLAN 7),
> in my opinion.  If the NIC is stripping the VLAN header, then this
> cannot work unless something re-builds the VLAN header.  If the stripped
> VLAN header is placed into the skb, then any code that does need to
> rebuild it can do so.  It may be less efficient, but users can just
> not use that NIC hardware for high-end solutions, and at any rate,
> less efficient is better than broken.

That is all true. The problem arises when you receive a tagged frame
on eth0, the chip removes the tag, and then the bridge sends it
out untagged on eth1.

I think there are two valid models for VLAN + bridging:

a) bridging works on "physical" interfaces, all tags are transmitted
   unchanged.

b) every VLAN is a different logical interface, packets from unknown
   VLANs are dropped on RX (and thus don't show up anywhere, except
   counters), bridging uses logical interfaces. VLAN 100 on eth0 may
   become VLAN 200 on eth1 and may be untagged on eth2.


"a" requires "soft" VLANs and/or adding the tags back (with
accelerated VLANs). This is how unmanaged switches labeled
"802.1Q - transparent" work. Not very flexible but usually good
enough.

"b" is how switches supporting VLANs (and 802.1Q) usually work.


I know ability to see exactly all packets as they are received
(including tags) is a really nice thing. But maybe we should change
the model? Making the ethX only carry untagged frames (even without
hw VLAN acceleration)?
-- 
Krzysztof Halasa

  reply	other threads:[~2007-11-06 20:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31 18:43 expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device? Dave Johnson
2007-10-31 19:33 ` Stephen Hemminger
2007-11-01  1:06   ` Ben Greear
2007-11-01  1:10     ` David Miller
2007-11-01  1:23     ` Stephen Hemminger
2007-11-01  1:31       ` Ben Greear
2007-11-01  4:50       ` David Miller
2007-11-01 15:04         ` Ben Greear
2007-11-01 21:35           ` David Miller
2007-11-01 21:36           ` Dave Johnson
2007-11-01 21:48             ` Rick Jones
2007-11-01 21:59               ` David Miller
2007-11-01 22:04                 ` Rick Jones
2007-11-01 22:07                   ` David Miller
2007-11-01 23:26                     ` Rick Jones
2007-11-05 17:46                       ` [PATCH 1/2] NET: Re-add VLAN tag for devices incapable of keeping it Dave Johnson
2007-11-05 18:00                         ` Patrick McHardy
2007-11-05 23:15                           ` David Miller
2007-11-06  0:21                             ` Patrick McHardy
2007-11-06  0:35                               ` David Miller
2007-11-06 18:03                               ` Krzysztof Halasa
2007-11-06 18:56                                 ` Ben Greear
2007-11-06 20:08                                   ` Krzysztof Halasa [this message]
2007-11-06 23:55                                 ` Patrick McHardy
2007-11-05 17:47                       ` [PATCH 2/2] " Dave Johnson
2007-11-06  2:39                         ` Ramkrishna Vepa
2007-11-06 18:28                           ` Ramkrishna Vepa
2007-11-06 18:34                             ` Dave Johnson
2007-11-01 21:58             ` expected behavior of PF_PACKET on NETIF_F_HW_VLAN_RX device? David Miller
2007-11-02 18:08             ` Dave Johnson
2007-11-02 21:20               ` David Miller
2007-11-02 21:52               ` Michael Chan

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=m3fxzj3znu.fsf@maximus.localdomain \
    --to=khc@pm.waw.pl \
    --cc=bguo@sw.starentnetworks.com \
    --cc=davem@davemloft.net \
    --cc=djohnson+linux-kernel@sw.starentnetworks.com \
    --cc=greearb@candelatech.com \
    --cc=jes@trained-monkey.org \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=ram.vepa@neterion.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).