+invirt-xen-config (0.0.32) unstable; urgency=low
+
+ * Use a bridge to connect the vif and tap interfaces for HVMs; this
+ allows HVMs to use paravirt drivers for improved performance (such as
+ on Windows).
+
+ -- Quentin Smith <quentin@mit.edu> Fri, 31 Dec 2010 02:35:40 -0500
+
invirt-xen-config (0.0.31) unstable; urgency=low
* Only run arpspoof when NICs are brought online (this potentially fixes
main_ip=$(dom0_ip)
dev=${dev:-${vif}}
+brname=dom${vif#vif}
+
case "$command" in
online)
- ifconfig ${dev} ${main_ip} netmask 255.255.255.255 up
- echo 1 >/proc/sys/net/ipv4/conf/${dev}/proxy_arp
- echo 1 >/proc/sys/net/ipv4/conf/${dev}/rp_filter
- xenstore-write "$XENBUS_PATH/feature-gso-tcpv4" 0
- if [ x${qemu_online} != xyes ]; then
- ethtool -K ${dev} tx off
- fi
+ setup_bridge_port ${dev}
+ setup_bridge_port ${vif}
+ create_bridge ${brname}
+ add_to_bridge ${brname} ${dev}
+ add_to_bridge ${brname} ${vif}
+ ifconfig ${brname} ${main_ip} netmask 255.255.255.255 up
+ echo 1 >/proc/sys/net/ipv4/conf/${brname}/proxy_arp
+ echo 1 >/proc/sys/net/ipv4/conf/${brname}/rp_filter
+ xenstore-write "$XENBUS_PATH/feature-gso-tcpv4" 0
+ ethtool -K ${vif} tso off
ipcmd='add'
cmdprefix=''
;;
offline)
- do_without_error ifdown ${vif}
+ do_without_error brctl delif ${brname} ${vif}
+ do_without_error brctl delif ${brname} ${dev}
+ do_without_error ifconfig ${brname} down
ipcmd='del'
cmdprefix='do_without_error'
;;
# If we've been given a list of IP addresses, then add routes from dom0 to
# the guest using those addresses.
for addr in ${ip} ; do
- ${cmdprefix} ip route ${ipcmd} ${addr} dev ${dev} src ${main_ip}
+ ${cmdprefix} ip route ${ipcmd} ${addr} dev ${brname} src ${main_ip}
if [ "$command" == "online" ]; then
arpspoof -i $(invirt-getconf xen.iface) -t 18.181.0.1 ${addr}&
sleep 5
fi
fi
+if [ "$command" == "offline" ]
+then
+ do_without_error brctl delbr ${brname}
+fi
+
log debug "Successful vif-route $command for $vif."
if [ "$command" == "online" ]
then