On 06/19/2009 12:19 PM, David Dillow wrote:
On Fri, 2009-06-19 at 11:08 -0500, Victor Lowther wrote:
Or you can include ethtool and check every half second until a timeout
to see if the link is back.
With most switches, you'll get a link back almost immediately, but it
will be in blocking mode and won't transmit your packets for 20-30
seconds.
Our test suite can simulate this by using attaching qemu's -net tap
device to a bridge to talk to the other virtual machine instead of using
-net socket mcast mode.
qemu -net
tap[,vlan=n][,name=name][,fd=h][,ifname=name][,script=file][,downscript=dfile]
script=can be a script that tells it to attach to a particular bridge.
#!/bin/sh
export PATH=/sbin:/usr/sbin:$PATH
BRIDGEDEV=br0
ifconfig $1 0.0.0.0 up
brctl addif ${BRIDGEDEV} $1
brctl setfd <bridge> <time> sets the bridge’s ’bridge forward delay’ to
<time> seconds.
Then you can use brctl to make the bridge's forward delay super long.
Warren Togami
wtogami@xxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html