[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/5] hotplug/linux: Add an option to disable acceleration on VIF



If a kernel driver in dom0 tries to access a network service
running in a domU, strange things happen if the acceleration
is not disabled. This offers an easy option to do it.

This has been observed with a CEPH RBD kernel driver trying
to access cluster with some OSDs running as domUs.

Signed-off-by: Sylvain Munaut <s.munaut@xxxxxxxxxxxxxxxxxxxx>
---
 tools/hotplug/Linux/vif-bridge |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/hotplug/Linux/vif-bridge b/tools/hotplug/Linux/vif-bridge
index 87279df..e0aa55d 100644
--- a/tools/hotplug/Linux/vif-bridge
+++ b/tools/hotplug/Linux/vif-bridge
@@ -35,6 +35,8 @@ dir=$(dirname "$0")
 bridge=${bridge:-}
 bridge=$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")
 
+accel=$(xenstore_read_default "$XENBUS_PATH/accel" "on")
+
 if [ -z "$bridge" ]
 then
   bridge=$(brctl show | awk 'NR==2{print$1}')
@@ -82,6 +84,10 @@ case "$command" in
     online)
         setup_virtual_bridge_port "$dev"
         set_mtu $bridge $dev
+        if [ "${accel}" = "off" ]
+        then
+            ethtool -K "$dev" tx off 1>/dev/null 2>&1
+        fi
         add_to_bridge "$bridge" "$dev"
         ;;
 
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.