Ethernet Bridge development
 help / color / mirror / Atom feed
From: Jaime Medrano <jaime.medrano@gmail.com>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: bridge@lists.osdl.org
Subject: Re: [Bridge] [PATCH] Add vlan id to bridge forward database
Date: Tue, 29 Apr 2008 10:24:14 +0200	[thread overview]
Message-ID: <20080429082414.GA6475@localhost> (raw)
In-Reply-To: <20080428135754.2ae382b4@extreme>

On Mon, Apr 28, 2008 at 01:57:54PM -0700, Stephen Hemminger wrote:
> I looked at this, and thought about cleaning it up and putting in
> next release but right now can't see how it could work with
> vlan accelerated hardware.

¿Did you see my last mail? I made the cleaning up you suggested and
generalized the code to support any level of nested tags instead of just
two.

> Your patch doesn't work if hardware does vlan acceleration. Vlan acceleration
> strips the tag off so skb->data points to actual contents and tag is passed
> up to vlan_receive_skb out of band. By the time the bridge sees the packet the
> actual tag is gone.

Yes, I know. However, AFAIK out of band passing of the vlan tag is only
done when a vlan device is created and attached to the ethernet device
of the port. That's a weird case from my point of view:

	brctl addif br0 eth0
	vconfig add eth0 5

If you want to get vlan packets from a bridge, you'd better attach the
device to the bridge instead of one of the ports:

	brctl addif br0 eth0
	vconfig add br0 5

If you attach it to a port, the out of band tag won't reach current
bridge code, and won't be restored on bridge output in case the packet
has to be forwarded.  Attaching the vlan device to the bridge device
doesn't enable hardware vlan acceleration, so that everything works.

> You might be able to get tag by using some API to reference the VLAN device,
> but it all gets complex and racy. Plus not sure if it is really even technically
> correct.

I guess the complexity overwhelms the benefits. Anyway, if that case is
to be handled I think that restoring the tag on output is more
important.

  reply	other threads:[~2008-04-29  8:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-17 16:13 [Bridge] [PATCH] Add vlan id to bridge forward database Jaime Medrano
2007-12-17 16:53 ` Stephen Hemminger
2007-12-18  9:05   ` Jaime Medrano
2008-01-28 15:39   ` Jaime Medrano
2008-01-28 20:29     ` [Bridge] " Benny Amorsen
2008-03-17 18:35     ` [Bridge] " Stephen Hemminger
2008-04-02  9:30       ` Jaime Medrano
2008-04-28 20:57     ` Stephen Hemminger
2008-04-29  8:24       ` Jaime Medrano [this message]
2008-04-29 12:43         ` Benny Amorsen
2008-04-29 15:18           ` Jaime Medrano
2008-04-29 23:16         ` richardvoigt
2008-04-30  2:25           ` Jonathan Thibault
  -- strict thread matches above, loose matches on Subject: below --
2007-12-17 16:13 Jaime Medrano

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=20080429082414.GA6475@localhost \
    --to=jaime.medrano@gmail.com \
    --cc=bridge@lists.osdl.org \
    --cc=shemminger@linux-foundation.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