[Bridge] [PATCH] Add vlan id to bridge forward database

Stephen Hemminger shemminger at linux-foundation.org
Mon Apr 28 13:57:54 PDT 2008


On Mon, 28 Jan 2008 16:39:14 +0100
Jaime Medrano <jaime.medrano at gmail.com> wrote:

> I'm resending this mail since I got no answer.
> 
> Is there any major problem in this?
> 
> Stephen Hemminger wrote:
> >
> > What about the nested vlan case?
> >
> 
> Below is a new patch that handles the double-tagging case. I'm not sure
> if it is worth a more generic case. ¿Are triple-tagging and so really used?
> 
> > This is a user/kernel ABI change. Does it break old tools?
> 
> New patch gets rid of the unused field but it still doesn't break old tools.
> 
> Anyway, the user part is not really needed. I just think it could be useful.
> 
> Regards,
> Jaime.
> 
> ---
> Subject: [PATCH] Add vlan id to bridge forward database
> 
> This makes forwarding table aware of 802.1Q vlan ids and stores
> id with MACs in the table. Up to two vlan tags are handled.
> 
> It solves problems when having same MAC on diffent pairs
> (vlan, port). Current code gets confused at that situation.
> 
> Local MACs are managed as present on every vlan.

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.

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.

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.


More information about the Bridge mailing list