Hi,

On one of our systems running Solaris, with igb network cards we are
noticing long delays when half-closing connections with LSO enabled.

The last piece of data in the tcp stream is delayed by about 0.5 or 4
seconds when sending data over a tcp connection and putting it in a
half-closed state by closing the sending part. (Apache2 uses this when
it is done sending the response when keepalive is not being used)

We found a way to reproduce this problem using a perl script and telnet
from another host. The script(testserver.pl) is attached to this bug
report. It listens on tcp port 34. It does not happen every time,
usually the first connection after a while seems fine, but everything
after that has the delay.

Steps to reproduce:
1. Start testserver.pl on host A (the server with the igb network cards).
2. Optional: start a packet sniffer (like snoop or tcpdump) on host B
(the host that will connect to host A)
3. Open a tcp connection using telnet to host A on port 34 using the
following command: telnet hostA 34
4. Type one line of input into telnet (it does not matter what you type)
5. Notice that the last data packet arrives with a delay of about 0.5 to
3.5 seconds.

A workaround for this problem is disabling ip_lso_outbound using ndd:
ndd -set /dev/ip ip_lso_outbound 0

Extra information:

root:/# uname -a
SunOS dmz03 5.10 Generic_142901-03 i86pc i386 i86pc

root:/# pkginfo -l SUNWigb
   PKGINST:  SUNWigb
      NAME:  Intel 82575 1Gb PCI Express NIC Driver
  CATEGORY:  system
      ARCH:  i386
   VERSION:  11.10.0,REV=2008.02.29.14.37
   BASEDIR:  /
    VENDOR:  Sun Microsystems, Inc.
      DESC:  Intel 82575 1Gb PCI Express NIC Driver
    PSTAMP:  on10-patch-x20100119094856
  INSTDATE:  Feb 09 2010 13:30
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:        6 installed pathnames
                   3 shared pathnames
                   3 directories
                   2 executables
                 702 blocks used (approx)

root:/# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
    inet 127.0.0.1 netmask ff000000
igb0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
    inet 192.168.196.3 netmask ffffff00 broadcast 192.168.196.255
    ether f4:ce:46:80:40:80
igb1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
    inet 172.29.1.36 netmask ffff0000 broadcast 172.29.255.255
    ether f4:ce:46:80:40:81

root:/# ndd -get /dev/ip ip_lso_outbound
1


Casper Mout,
Initworks B.V.

#!/bin/perl

use strict;
use warnings;
use Socket;

socket(SERVER, PF_INET, SOCK_STREAM, getprotobyname('tcp')) or die "error1";
setsockopt(SERVER, SOL_SOCKET, SO_REUSEADDR, 1) or die "error2";
my $paddr = sockaddr_in(34, INADDR_ANY);
bind(SERVER, $paddr) or die "error3";
listen(SERVER, SOMAXCONN) or die "error4";

print "server started";

my $client_addr;
while($client_addr = accept(CLIENT, SERVER)) {
        my ($client_port, $client_ip) = sockaddr_in($client_addr);
        my $client_ipnum = inet_ntoa($client_ip);
        my $client_host = gethostbyaddr($client_ip, AF_INET);

        my $oldh = select(CLIENT);
        $| = 1; # enable autoflush
        select($oldh);

        my $l = readline CLIENT;

        print CLIENT "testje $l\n";

        for(my $i = 0; $i < 100; $i++) {
                print CLIENT "$i: 
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789\n";
        }
        print CLIENT "testje\n";

        shutdown(CLIENT, 1);
        sleep 1;
        close CLIENT;
}


_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to