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

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



On Wed, 2014-05-14 at 17:23 +0200, Sylvain Munaut wrote:
> 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.

By acceleration here you mean tx checksum offload I think?

How does one go about arranging for this xenstore key to be set?

The XCP vif script[0] handles a wide variety of keys via keys like
ethtool-tx ethtool-rx etc.

FWIW I think this could also be achieved locally with a script
in /etc/xen/scripts/vif-post.d.

[0] https://github.com/xapi-project/xen-api/blob/master/scripts/vif

> 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"
>          ;;
>  



_______________________________________________
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®.