• Tobias Waldekranz's avatar
    net: bridge: mst: Support setting and reporting MST port states · 122c2948
    Tobias Waldekranz authored
    Make it possible to change the port state in a given MSTI by extending
    the bridge port netlink interface (RTM_SETLINK on PF_BRIDGE).The
    proposed iproute2 interface would be:
    
        bridge mst set dev <PORT> msti <MSTI> state <STATE>
    
    Current states in all applicable MSTIs can also be dumped via a
    corresponding RTM_GETLINK. The proposed iproute interface looks like
    this:
    
    $ bridge mst
    port              msti
    vb1               0
    		    state forwarding
    		  100
    		    state disabled
    vb2               0
    		    state forwarding
    		  100
    		    state forwarding
    
    The preexisting per-VLAN states are still valid in the MST
    mode (although they are read-only), and can be queried as usual if one
    is interested in knowing a particular VLAN's state without having to
    care about the VID to MSTI mapping (in this example VLAN 20 and 30 are
    bound to MSTI 100):
    
    $ bridge -d vlan
    port              vlan-id
    vb1               10
    		    state forwarding mcast_router 1
    		  20
    		    state disabled mcast_router 1
    		  30
    		    state disabled mcast_router 1
    		  40
    		    state forwarding mcast_router 1
    vb2               10
    		    state forwarding mcast_router 1
    		  20
    		    state forwarding mcast_router 1
    		  30
    		    state forwarding mcast_router 1
    		  40
    		    state forwarding mcast_router 1
    Signed-off-by: default avatarTobias Waldekranz <tobias@waldekranz.com>
    Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    122c2948
br_netlink.c 53.5 KB