WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] [Fwd: DHCP and DomUs troubles]

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] [Fwd: DHCP and DomUs troubles]
From: Arnaud JAYET <ajayet@xxxxxxx>
Date: Sun, 31 Jan 2010 14:48:46 +0100
Cc: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
Delivery-date: Sun, 31 Jan 2010 05:49:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <7207d96f1001301444p56d7165k586611a423d8fb9@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4B641A9A.6010707@xxxxxxx> <7207d96f1001300407w71873b5co7f48c82e0a667c5b@xxxxxxxxxxxxxx> <4B6464AC.2040907@xxxxxxx> <7207d96f1001301444p56d7165k586611a423d8fb9@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
Fajar A. Nugraha a écrit :
 > You could hack /etc/xen/scripts/vif-bridge, preferably be creating a
new file and use it on domU config file (per domU) or set it to be
default on xend-config.sxp (global). In my case, I hacked it to
automatically restart snmp every time a new interface is activated.

Interesting. But how can you specify a specific network or vif script inside a domU .cfg config file ?
I don't see any explanation about this in Xen user documentation.


To automate domU tx checksum disabling i do the following hack :

in /etc/xen/scripts/xen-network-common.sh, i added the ehttool line at end of add_to_bridge() function :

# Usage: add_to_bridge bridge dev
add_to_bridge () {
    local bridge=$1
    local dev=$2

    # Don't add $dev to $bridge if it's already on a bridge.
    if [ -e "/sys/class/net/${bridge}/brif/${dev}" ]; then
        ip link set ${dev} up || true
        return
    fi
    brctl addif ${bridge} ${dev}
    ip link set ${dev} up

    ### disabling tx checksum for vif x.y, DHCP trouble
    ethtool -K ${dev} tx off
}


When creating the domU, it's vif X.Y interface has now tx checksum off and my dhcp's request problem inside domU disappears. my DomU has now its dynamic IP address at boot.

I also noticed that the ehttool line in /etc/network/interfaces inside the domU is useless. Without this line, domU's eth0 tx checksum is on but DHCP request works.

domU (ID 17) boot :
...
...
Listening on LPF/eth0/00:16:3e:7f:bf:11
Sending on   LPF/eth0/00:16:3e:7f:bf:11
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 192.168.115.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.115.1
bound to 192.168.115.107 -- renewal in 19160 seconds.
done.
...
...


domU# ethtool -k eth0
Offload parameters for eth0:
Cannot get device rx csum settings: Operation not supported
Cannot get device flags: Operation not supported
rx-checksumming: off
==> tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
udp fragmentation offload: off
generic segmentation offload: off
large receive offload: off


domO# ethtool -k vif17.0
Offload parameters for vif17.0:
Cannot get device rx csum settings: Operation not supported
Cannot get device flags: Operation not supported
rx-checksumming: off
==> tx-checksumming: off
scatter-gather: on
tcp segmentation offload: on
udp fragmentation offload: off
generic segmentation offload: off
large receive offload: off

----

A more general question above my specific DHCP problem. Is it a good idea to always disable tx (and rx ?) interface checksum for DomUs (inside domU and inside dom0 vif interfaces) ?

I red in the Xen mailing list some performance troubles due to domU tx checksums.

In recent Xen version (like 3.4) does the tx/tx checksum are disabled by default in domO vif X.Y interfaces and domUs ?


Thank you for your help Fajar.
I hope this thread could help Debian Lenny users.

Arnaud


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users