netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] (1/4) propgate bridge internal MTU changes
@ 2004-07-28 22:37 Stephen Hemminger
  2004-07-29  2:17 ` David S. Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2004-07-28 22:37 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, bridge

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

Need to propagate MTU changes that the bridge does to it's pseudo interface
up to others. There ends up being a double call to br_min_mtu() but that's
harmless.

Cleans up the EXPORT_SYMBOLS including dev_change_flags which is used by vlan.
Shouldn't be basing exports on kernel config options like this.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
 
diff -Nru a/net/bridge/br_if.c b/net/bridge/br_if.c
--- a/net/bridge/br_if.c	2004-07-28 15:33:20 -07:00
+++ b/net/bridge/br_if.c	2004-07-28 15:33:20 -07:00
@@ -295,6 +295,7 @@
 	return ret;
 }
 
+/* Mtu of the bridge pseudo-device 1500 or the minimum of the ports */
 int br_min_mtu(const struct net_bridge *br)
 {
 	const struct net_bridge_port *p;
@@ -347,7 +348,7 @@
 			br_stp_enable_port(p);
 		spin_unlock_bh(&br->lock);
 
-		br->dev->mtu = br_min_mtu(br);
+		dev_set_mtu(br->dev, br_min_mtu(br));
 	}
 
 	return err;
diff -Nru a/net/bridge/br_notify.c b/net/bridge/br_notify.c
--- a/net/bridge/br_notify.c	2004-07-28 15:33:20 -07:00
+++ b/net/bridge/br_notify.c	2004-07-28 15:33:20 -07:00
@@ -48,7 +48,7 @@
 		break;
 
 	case NETDEV_CHANGEMTU:
-		br->dev->mtu = br_min_mtu(br);
+		dev_set_mtu(br->dev, br_min_mtu(br));
 		break;
 
 	case NETDEV_DOWN:
diff -Nru a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c	2004-07-28 15:33:20 -07:00
+++ b/net/core/dev.c	2004-07-28 15:33:20 -07:00
@@ -3426,6 +3426,8 @@
 EXPORT_SYMBOL(dev_remove_pack);
 EXPORT_SYMBOL(dev_set_allmulti);
 EXPORT_SYMBOL(dev_set_promiscuity);
+EXPORT_SYMBOL(dev_change_flags);
+EXPORT_SYMBOL(dev_set_mtu);
 EXPORT_SYMBOL(free_netdev);
 EXPORT_SYMBOL(netdev_boot_setup_check);
 EXPORT_SYMBOL(netdev_set_master);
@@ -3443,10 +3445,7 @@
 #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
 EXPORT_SYMBOL(br_handle_frame_hook);
 #endif
-/* for 801q VLAN support */
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
-EXPORT_SYMBOL(dev_change_flags);
-#endif
+
 #ifdef CONFIG_KMOD
 EXPORT_SYMBOL(dev_load);
 #endif

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
Bridge mailing list
Bridge@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/bridge

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-29 21:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 22:37 [PATCH] (1/4) propgate bridge internal MTU changes Stephen Hemminger
2004-07-29  2:17 ` David S. Miller
2004-07-29  5:10   ` [Bridge] " shemminger
2004-07-29 17:59   ` Stephen Hemminger
2004-07-29 21:51     ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).