From: Yotam Gigi <yot...@mellanox.com>

Due to the fact that multicast routes hold the minimum MTU of all the
egress RIFs and trap packets that don't meet it, notify the mulitcast
router code on RIF MTU changes.

Signed-off-by: Yotam Gigi <yot...@mellanox.com>
Reviewed-by: Ido Schimmel <ido...@mellanox.com>
Signed-off-by: Jiri Pirko <j...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index b36ec63..edc6462 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -5648,6 +5648,17 @@ int mlxsw_sp_netdevice_router_port_event(struct 
net_device *dev)
        if (err)
                goto err_rif_fdb_op;
 
+       if (rif->mtu != dev->mtu) {
+               struct mlxsw_sp_vr *vr;
+
+               /* The RIF is relevant only to its mr_table instance, as unlike
+                * unicast routing, in multicast routing a RIF cannot be shared
+                * between several multicast routing tables.
+                */
+               vr = &mlxsw_sp->router->vrs[rif->vr_id];
+               mlxsw_sp_mr_rif_mtu_update(vr->mr4_table, rif, dev->mtu);
+       }
+
        ether_addr_copy(rif->addr, dev->dev_addr);
        rif->mtu = dev->mtu;
 
-- 
2.9.5

Reply via email to