diff mbox series

[RFC,net-next,12/13] net: dsa: treat switchdev notifications for multicast router connected to port

Message ID 20200521211036.668624-13-olteanv@gmail.com
State New
Headers show
Series [RFC,net-next,01/13] net: core: dev_addr_lists: add VID to device address | expand

Commit Message

Vladimir Oltean May 21, 2020, 9:10 p.m. UTC
From: Vladimir Oltean <vladimir.oltean@nxp.com>

Similar to the "bridge is multicast router" case, unknown multicast
should be flooded by this bridge to the ports where a multicast router
is connected.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 net/dsa/slave.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 2743d689f6b1..c023f1120736 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -467,7 +467,12 @@  static int dsa_slave_port_attr_set(struct net_device *dev,
 	case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
 		ret = dsa_port_bridge_flags(dp, attr->u.brport_flags, trans);
 		break;
+	case SWITCHDEV_ATTR_ID_PORT_MROUTER:
+		/* A multicast router is connected to this external port */
+		ret = dsa_port_mrouter(dp, attr->u.mrouter, trans);
+		break;
 	case SWITCHDEV_ATTR_ID_BRIDGE_MROUTER:
+		/* The local bridge is a multicast router */
 		ret = dsa_port_mrouter(dp->cpu_dp, attr->u.mrouter, trans);
 		break;
 	default: