]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: add support for switchdev VLAN objects
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 13 Aug 2015 16:52:17 +0000 (12:52 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Aug 2015 04:31:12 +0000 (21:31 -0700)
commitaf84012363d1bb711c7c6b5f8e349d1537b1ce5e
tree55f2a584cbd0811e64ccce8e904e67c33902db58
parenta64b5ef0baa1f57e60a4d2db35844ea2cc3d7a2b
net: dsa: add support for switchdev VLAN objects

Add new functions in DSA drivers to access hardware VLAN entries through
SWITCHDEV_OBJ_PORT_VLAN objects:

 - port_pvid_get() and vlan_getnext() to dump a VLAN
 - port_vlan_del() to exclude a port from a VLAN
 - port_pvid_set() and port_vlan_add() to join a port to a VLAN

The DSA infrastructure will ensure that each VLAN of the given range
does not already belong to another bridge. If it does, it will fallback
to software VLAN and won't program the hardware.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/slave.c