Skip to content

Commit

Permalink
mlxsw: spectrum: Notify multicast router on RIF MTU changes
Browse files Browse the repository at this point in the history
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 <yotamg@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yotam Gigi authored and David S. Miller committed Sep 27, 2017
1 parent d42b096 commit fd890fe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -5773,6 +5773,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;

Expand Down

0 comments on commit fd890fe

Please sign in to comment.