diff options
author | Ido Schimmel <idosch@mellanox.com> | 2015-12-15 16:03:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-15 11:58:20 -0500 |
commit | 6ff64f6f9242d7e50f3e99cb280f69d1927a5fa6 (patch) | |
tree | 85d9661650c22ab27fe654433360f9e33172f7b9 /net/bridge/br_stp_if.c | |
parent | 9d547833f02fb8b52ab824adae8f850f3c22fd4f (diff) | |
download | linux-6ff64f6f9242d7e50f3e99cb280f69d1927a5fa6.tar.gz linux-6ff64f6f9242d7e50f3e99cb280f69d1927a5fa6.tar.bz2 linux-6ff64f6f9242d7e50f3e99cb280f69d1927a5fa6.zip |
switchdev: Pass original device to port netdev driver
switchdev drivers need to know the netdev on which the switchdev op was
invoked. For example, the STP state of a VLAN interface configured on top
of a port can change while being member in a bridge. In this case, the
underlying driver should only change the STP state of that particular
VLAN and not of all the VLANs configured on the port.
However, current switchdev infrastructure only passes the port netdev down
to the driver. Solve that by passing the original device down to the
driver as part of the required switchdev object / attribute.
This doesn't entail any change in current switchdev drivers. It simply
enables those supporting stacked devices to know the originating device
and act accordingly.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_stp_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 5396ff08af32..775e00fbeb1e 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -37,6 +37,7 @@ static inline port_id br_make_port_id(__u8 priority, __u16 port_no) void br_init_port(struct net_bridge_port *p) { struct switchdev_attr attr = { + .orig_dev = p->dev, .id = SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME, .flags = SWITCHDEV_F_SKIP_EOPNOTSUPP | SWITCHDEV_F_DEFER, .u.ageing_time = p->br->ageing_time, |