VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: dingtianhong <dingtianhong@huawei.com> 2014-05-13 14:39:27 +0800 committer: David S. Miller <davem@davemloft.net> 2014-05-14 15:35:03 -0400 commit: 3763e7ef17143f5e9ae044638e65d2b0c0305fcf parent: 8ba7e7bfc39e05b57ed90a70db2b411b1204377b
Commit Summary:
macvlan: Propagate lowerdev MTU changes
Diffstat:
1 file 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,
 			netdev_update_features(vlan->dev);
 		}
 		break;
+	case NETDEV_CHANGEMTU:
+		list_for_each_entry(vlan, &port->vlans, list) {
+			if (vlan->dev->mtu <= dev->mtu)
+				continue;
+			dev_set_mtu(vlan->dev, dev->mtu);
+		}
+		break;
 	case NETDEV_UNREGISTER:
 		/* twiddle thumbs on netns device moves */
 		if (dev->reg_state != NETREG_UNREGISTERING)