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

Re: [Xen-users] XEN PV networking: checksum issues



Am 09.02.15 um 10:21 schrieb Ian Campbell:
On Mon, 2015-02-09 at 00:11 +0100, Atom2 wrote:

BTW changing the setting for the vif can easily be automated by using
the script= option for the vif specification in the relevant domU xl
configuration file.

FWIW I think this can possibly also be achieved (at least for Linux
dom0) by using the hook scripts which are called by the default vif-*
script (e.g. vif-bridge). Look for "call_hooks" in the vif-*. The
scripts are dropped in /etc/xen/scripts/vif-post.d etc.
I did have a look at the call_hooks concept. It is an interesting and flexible concept that I was not aware of and I am happy to have learned something new, but I came to the conclusion that it probably is not ideally suited for solving this issue: Unless I misunderstood the conecpt/the script, the hook would be executed for every instance of vif-bridge wheras it is only required for the one vif I/f connected to the pfSense domU.

Just for reference my solution was creating a wrapper bash script named vif-bridge.noTXoffload which is specified as script= in the xl config file for the (currently one) affected domU and is pretty simple:

#/!bin/bash
if ${0%.*} $* ; then
    if [[ "$1" == "online" && $2 == "type_if=vif" ]] ; then
        ifname=$(xenstore-read /local/domain/0/$XENBUS_PATH/vifname)
        /usr/sbin/ethtool --offload "$ifname" tx off >/dev/null 2>&1
    fi
fi

This approach also ensures that any possible changes to the main vif-bridge script in newer releases would be dealt with appropriately without any changes to my wrapper sscript (that is unless the first two invocation parameters to the vif-bridge script were to change)

Thanks again Atom2

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


 


Rackspace

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