TritonDataCenter / illumos-kvm

KVM driver for illumos
Other
116 stars 65 forks source link

Solaris 10 guest network hang #5

Open xtrondo opened 12 years ago

xtrondo commented 12 years ago

not sure if this is the right place for report this, on my working KVM test ring with a Intel 2600K cpu I start to test several guest OS, CentOS6 and Debian 6.0.2 both work great with good i/o and network performance, but on Solaris 10 u10 08/11 installation went ok, however network hang after a few packets are sent, e.g: ssh to guest OS hang after a few commands are issued, this is a know problem?

QEMU options used:

VNIC=2 VM=lacerta VNC=2 CD=sol-10-u10-ga2-x86-dvd.iso DISK=disk0 MAC=$(/usr/sbin/dladm show-vnic -po macaddress vnic${VNIC}) sudo /smartdc/bin/qemu-system-x86_64 \ -boot cd \ -enable-kvm \ -vnc 0.0.0.0:${VNC} \ -smp 2 \ -m 2048 \ -no-hpet \ -localtime \ -drive file=/dev/zvol/rdsk/lpool/kvm/${VM}/disk0,if=ide,index=0 \ -drive file=/export/home/calmeida/Downloads/${CD},media=cdrom,if=ide,index=2 \ -net nic,vlan=0,name=net0,model=e1000,macaddr=${MAC} \ -net vnic,vlan=0,name=net0,ifname=vnic${VNIC},macaddr=${MAC} \ -vga std

Kind Regards from Portugal, CA,

rmustacc commented 12 years ago

The performance is going to be worse in S10 due to a lack of virtio drivers, but it shouldn't hang completely. If you attach via VNC is the nic correctly coming up and plumbing?

You may want to consider trying a different model and use the rtl (I forget the full version name) as opposed to the e1000.

xtrondo commented 12 years ago

just to add when using rtl8139 network not hang and ssh session is usable, however performance is really bad, even the e1000 with all stalling and recover while doing scp a big file is 7x faster

xtrondo commented 12 years ago

just to add I found this bug reported on qemu-kvm as bug #6389955 "emulated netcards don't work with recent sunos kernel ", and apply the fix from last post, and now e1000 works without hang and acceptable performance, maybe you guys can add that patch to joyent-qemu-kvm gate?

The PCI/PCI-X Family of Gigabit Ethernet Controllers Software Developer’s Manual states the following about the POPTS field:

Provides a number of options which control the handling of this packet. This field is ignored except on the first data descriptor of a packet.

The current implementation always loads the field and its checksum offload flags. This patch uses only the first descriptor's POPTS field in order to comply with the specification.

When Solaris sends multi-descriptor packets it fills in POPTS for the first descriptor only. Therefore this patch is necessary in order to perform checksum offload correctly for multi-descriptor packets.

Reported-by: Daniel Pecka

Signed-off-by: Stefan Hajnoczi

v2:

diff --git a/hw/e1000.c b/hw/e1000.c index 0a4574c..2a4d5c7 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -446,7 +446,9 @@ process_tx_desc(E1000State s, struct e1000_tx_desc dp) return; } else if (dtype == (E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D)) { // data descriptor

King regards CA,