]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
switchdev: add new switchdev bridge setlink
authorScott Feldman <sfeldma@gmail.com>
Sun, 10 May 2015 16:47:56 +0000 (09:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2015 22:43:54 +0000 (18:43 -0400)
commit47f8328bb1a4115413e35b9b20d04b061ed544f8
tree914bd885bca27e62e2f1c35c409d4d833b3aeb3c
parent6004c86718998aee1337efd3b087d6e17284632d
switchdev: add new switchdev bridge setlink

Add new switchdev_port_bridge_setlink that can be used by drivers
implementing .ndo_bridge_setlink to set switchdev bridge attributes.
Basically turn the raw rtnl_bridge_setlink netlink into switchdev attr
sets.  Proper netlink attr policy checking is done on the protinfo part of
the netlink msg.

Currently, for protinfo, only bridge port attrs BR_LEARNING and
BR_LEARNING_SYNC are parsed and passed to port driver.

For afspec, VLAN objs are passed so switchdev driver can set VLANs assigned
to SELF.  To illustrate with iproute2 cmd, we have:

bridge vlan add vid 10 dev sw1p1 self master

To add VLAN 10 to port sw1p1 for both the bridge (master) and the device
(self).

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/switchdev/switchdev.c