From: Ryan Harper <ryanh@us.ibm.com>
To: xen-devel@lists.xensource.com
Cc: Kip Macy <kip.macy@gmail.com>
Subject: [PATCH] scripts, patches: remove workaround, skip brtcl delif
Date: Fri, 19 Aug 2005 13:54:04 -0500 [thread overview]
Message-ID: <20050819185404.GD5523@us.ibm.com> (raw)
In-Reply-To: <20050819164629.GA5523@us.ibm.com>
Attached is a patch that needs more testing, but I've not been able to
recreate the race-condition with this patch applied. It does the
following:
1. Remove workaround patch
2. Update scripts/network-bridge and scripts/vif-bridge to not call
brctl delif
When a domU is shutdown/destroyed and the netif is destroyed, the
notify_call_chain triggered from unregister_netdevice() will trigger the
bridge event handler and which will call the proper code to remove the
device from the bridge.
I can't see any reason why brtcl delif should be called when taking out
a domain if the call chain will delete the interface from the bridge
when the vif is destroyed automatically.
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253 T/L: 678-9253
ryanh@us.ibm.com
diffstat output:
a/patches/linux-2.6.12/workaround_double_br_del_if.patch | 11 -----------
tools/examples/network-bridge | 3 ---
tools/examples/vif-bridge | 6 ++++--
3 files changed, 4 insertions(+), 16 deletions(-)
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
---
diff -r 188c782fa9bb tools/examples/vif-bridge
--- a/tools/examples/vif-bridge Fri Aug 19 13:05:31 2005
+++ b/tools/examples/vif-bridge Fri Aug 19 13:31:04 2005
@@ -74,8 +74,10 @@
exit
fi
-# Add/remove vif to/from bridge.
-brctl ${brcmd} ${bridge} ${vif}
+# Add vif to bridge. vifs are auto-removed from bridge
+if [ "${brcmd}" == "addif" ] ; then
+ brctl ${brcmd} ${bridge} ${vif}
+fi
ifconfig ${vif} $OP
if [ ${ip} ] ; then
diff -r 188c782fa9bb tools/examples/network-bridge
--- a/tools/examples/network-bridge Fri Aug 19 13:05:31 2005
+++ b/tools/examples/network-bridge Fri Aug 19 13:31:04 2005
@@ -222,10 +222,7 @@
return
fi
- brctl delif ${bridge} ${netdev}
-
if ifconfig veth0 2>/dev/null | grep -q veth0 ; then
- brctl delif ${bridge} vif0.0
ifconfig vif0.0 down
mac=`ifconfig veth0 | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'`
ifconfig ${netdev} down
diff -r 188c782fa9bb patches/linux-2.6.12/workaround_double_br_del_if.patch
--- a/patches/linux-2.6.12/workaround_double_br_del_if.patch Fri Aug 19 13:05:31 2005
+++ /dev/null Fri Aug 19 13:31:04 2005
@@ -1,11 +0,0 @@
---- linux-2.6.12/net/bridge/br_if.c 2005-06-17 14:48:29.000000000 -0500
-+++ linux-2.6.12-xen0-smp/net/bridge/br_if.c 2005-08-18 15:17:27.302615846 -0500
-@@ -382,7 +382,7 @@
- {
- struct net_bridge_port *p = dev->br_port;
-
-- if (!p || p->br != br)
-+ if (!p || p->br != br || p->state == BR_STATE_DISABLED)
- return -EINVAL;
-
- br_sysfs_removeif(p);
next prev parent reply other threads:[~2005-08-19 18:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-18 21:01 [PATCH] patches: workaround for br_del_if race Ryan Harper
2005-08-19 8:34 ` Keir Fraser
2005-08-19 16:46 ` Ryan Harper
2005-08-19 18:54 ` Ryan Harper [this message]
2005-08-20 9:34 ` [PATCH] scripts, patches: remove workaround, skip brtcl delif Keir Fraser
2005-08-20 9:21 ` [PATCH] patches: workaround for br_del_if race Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050819185404.GD5523@us.ibm.com \
--to=ryanh@us.ibm.com \
--cc=kip.macy@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.