aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2014-05-13 02:39:27 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-14 15:35:03 -0400
commit3763e7ef17143f5e9ae044638e65d2b0c0305fcf (patch)
tree2db78cfb6855a1bc040fb55915a13fbe47b53ef4 /drivers/net/macvlan.c
parent8ba7e7bfc39e05b57ed90a70db2b411b1204377b (diff)
macvlan: Propagate lowerdev MTU changes
When the physical MTU changes we should ensure that all existing MACVLAN dev MTU do not exceed the new lowerdev MTU. This patch adds that propagation. Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Reviewed-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index f0118d1a3e46..e03707de1eee 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -1091,6 +1091,13 @@ static int macvlan_device_event(struct notifier_block *unused,
1091 netdev_update_features(vlan->dev); 1091 netdev_update_features(vlan->dev);
1092 } 1092 }
1093 break; 1093 break;
1094 case NETDEV_CHANGEMTU:
1095 list_for_each_entry(vlan, &port->vlans, list) {
1096 if (vlan->dev->mtu <= dev->mtu)
1097 continue;
1098 dev_set_mtu(vlan->dev, dev->mtu);
1099 }
1100 break;
1094 case NETDEV_UNREGISTER: 1101 case NETDEV_UNREGISTER:
1095 /* twiddle thumbs on netns device moves */ 1102 /* twiddle thumbs on netns device moves */
1096 if (dev->reg_state != NETREG_UNREGISTERING) 1103 if (dev->reg_state != NETREG_UNREGISTERING)