User: Password:
Subscribe / Log in / New account

Add basic VLAN support to bridges

From:  Vlad Yasevich <>
Subject:  [RFC PATCH bridge 0/5] Add basic VLAN support to bridges
Date:  Thu, 23 Aug 2012 15:29:50 -0400
Message-ID:  <>
Cc:  Vlad Yasevich <>
Archive-link:  Article

This series of patches provides an ability to add VLAN IDs to the bridge
ports.  This is similar to what can be found in most switches.  The bridge
port may have any number of VLANs added to it including vlan 0 for untagged
traffic.  When vlans are added to the port, only traffic tagged with particular
vlan will forwarded over this port.  Additionally, vlan ids are added to FDB
entries and become part of the lookup.  This way we correctly identify the FDB

There are still pieces missing.  I don't yet support adding a static fdb entry
with a particular vlan.  There is no netlink support for carrying a vlan id.

I'd like to hear thoughts of whether this is usufull and something we should

The default behavior ofthe bridge is unchanged if no vlans have been

Vlad Yasevich (5):
  bridge: Add vlan check to forwarding path
  bridge: Add vlan to unicast fdb entries
  bridge: Add vlan id to multicast groups
  bridge: Add private ioctls to configure vlans on bridge ports
  bridge: Add sysfs interface to display VLANS

 include/linux/if_bridge.h |    4 ++
 net/bridge/br_device.c    |    2 +-
 net/bridge/br_fdb.c       |   71 ++++++++++++++++++-------------
 net/bridge/br_forward.c   |   17 +++++++-
 net/bridge/br_if.c        |  103 +++++++++++++++++++++++++++++++++++++++++++++
 net/bridge/br_input.c     |   18 +++++++-
 net/bridge/br_ioctl.c     |   31 +++++++++++++
 net/bridge/br_multicast.c |   64 +++++++++++++++++++---------
 net/bridge/br_private.h   |   14 +++++-
 net/bridge/br_sysfs_if.c  |   28 ++++++++++++
 10 files changed, 296 insertions(+), 56 deletions(-)


Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds