* [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* Re: [PATCH] (1/4) propgate bridge internal MTU changes
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
0 siblings, 2 replies; 5+ messages in thread
From: David S. Miller @ 2004-07-29 2:17 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: bridge, netdev
I assume these 4 patches are for 2.6.x? I'll hit them tomorrow,
regardless.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bridge] Re: [PATCH] (1/4) propgate bridge internal MTU changes
2004-07-29 2:17 ` David S. Miller
@ 2004-07-29 5:10 ` shemminger
2004-07-29 17:59 ` Stephen Hemminger
1 sibling, 0 replies; 5+ messages in thread
From: shemminger @ 2004-07-29 5:10 UTC (permalink / raw)
To: David S. Miller; +Cc: Stephen Hemminger, netdev, bridge
>
> I assume these 4 patches are for 2.6.x? I'll hit them tomorrow,
> regardless.
> _______________________________________________
> Bridge mailing list
> Bridge@lists.osdl.org
> http://lists.osdl.org/mailman/listinfo/bridge
There is one missing additional piece, the fdb RCU code needs
to use call_rcu(). Testing it now.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] (1/4) propgate bridge internal MTU changes
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
1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2004-07-29 17:59 UTC (permalink / raw)
To: David S. Miller; +Cc: bridge, netdev
Follow up to earlier RCU patch. Since now using RCU, need to use
deferred free.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
diff -Nru a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
--- a/net/bridge/br_fdb.c 2004-07-29 11:00:07 -07:00
+++ b/net/bridge/br_fdb.c 2004-07-29 11:00:07 -07:00
@@ -217,11 +217,18 @@
return fdb;
}
+static void fdb_rcu_free(struct rcu_head *head)
+{
+ struct net_bridge_fdb_entry *ent
+ = container_of(head, struct net_bridge_fdb_entry, rcu);
+ kmem_cache_free(br_fdb_cache, ent);
+}
+/* Set entry up for deletion with RCU */
void br_fdb_put(struct net_bridge_fdb_entry *ent)
{
if (atomic_dec_and_test(&ent->use_count))
- kmem_cache_free(br_fdb_cache, ent);
+ call_rcu(&ent->rcu, fdb_rcu_free);
}
/*
diff -Nru a/net/bridge/br_private.h b/net/bridge/br_private.h
--- a/net/bridge/br_private.h 2004-07-29 11:00:07 -07:00
+++ b/net/bridge/br_private.h 2004-07-29 11:00:07 -07:00
@@ -46,7 +46,10 @@
{
struct hlist_node hlist;
struct net_bridge_port *dst;
- struct list_head age_list;
+ union {
+ struct list_head age_list;
+ struct rcu_head rcu;
+ };
atomic_t use_count;
unsigned long ageing_timer;
mac_addr addr;
^ 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).