Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Apr 2009 12:46:13 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        Bjoern Koenig <bkoenig@alpha-tierchen.de>
Cc:        stable@freebsd.org
Subject:   Re: fxp: stalled transfers
Message-ID:  <20090411034613.GA54253@michelle.cdnetworks.co.kr>
In-Reply-To: <20090410101445.GL37714@michelle.cdnetworks.co.kr>
References:  <70ba25e4f1a5e43ab8d99b361235dda2.squirrel@webmail.alpha-tierchen.de> <20090409000427.GD37714@michelle.cdnetworks.co.kr> <2f68678165f20f2e1dae10cb0e63761d.squirrel@webmail.alpha-tierchen.de> <20090409072309.GF37714@michelle.cdnetworks.co.kr> <c527997835b4ea46c1e492c3a3c9d030.squirrel@webmail.alpha-tierchen.de> <37a8d3252c3d50682f4fb790e30e09f3.squirrel@webmail.alpha-tierchen.de> <20090410101445.GL37714@michelle.cdnetworks.co.kr>

next in thread | previous in thread | raw e-mail | index | archive | help

--X1bOJ3K7DJ5YkBrT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Apr 10, 2009 at 07:14:45PM +0900, Pyun YongHyeon wrote:
> On Fri, Apr 10, 2009 at 08:46:08AM +0200, Bjoern Koenig wrote:
> > I wrote:
> > >
> > >> If you can easily reproduce the issue, can you capture stalled TCP
> > >> session with tcpdump on receiving host?(Make sure to disable Rx
> > >> checksum offload prior to capturing the session.)
> > >
> > > I transferred a 256 kiB file and these are the tcpdumps:
> > >
> > > http://www.alpha-tierchen.de/~bkoenig/fxp0-with-tso.txt
> > > http://www.alpha-tierchen.de/~bkoenig/fxp0-without-tso.txt
> > >
> > > Actually the transfer doesn't stall although ftp and scp told me so. It
> > > becomes incredibly slow. It seems like that the chunks are too large and a
> > > smaller packet will be resent. I decreased the MTU from 1500 to 1492 and
> > > it works fine with TSO enabled.
> > >
> > > I also captured the traffic on my router:
> > >
> > > http://www.alpha-tierchen.de/~bkoenig/fxp0-with-tso-router.txt
> > > http://www.alpha-tierchen.de/~bkoenig/fxp0-without-tso-router.txt
> > >
> > > It reveals a suspect information: "truncated-ip - 8 bytes missing!"
> > >
> > > I almost suppose that this is a PPPoE-related configuration issue and the
> > > fxp driver is not necessarily the problem since decreasing the MTU of the
> > > LAN host solves it.
> > 
> > Hello, it's me again. :)
> > 
> > It's not PPPoE-related. I was able to reproduce the behaviour within a
> > regular LAN from host to host. I also have another symptom which denies
> > the PPPoE assumption:
> > 
> > If I set MTU to value X then it doesn't work with MTU X+N anymore. I'll
> > get the message "N bytes missing!" in the tcpdump output. For example:
> > 
> > ifconfig fxp0 mtu 1448   # works
> > ifconfig fxp0 mtu 1412   # still works
> > ifconfig fxp0 mtu 1448   # doesn't work (36 bytes missing)
> > ifconfig fxp0 mtu 1400   # works
> > ifconfig fxp0 mtu 1412   # doesn't work (12 bytes missing)
> > 
> 
> Hmm, I can't reproduce this. Can you send me a URL to captured
> data for broken case?

Ok, I've reproduced it, it seems that it happens when sender and
receiver has advertised different MSS. Try attached patch and let
me know how it goes on your setup.

--X1bOJ3K7DJ5YkBrT
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="fxp.tso.patch"

Index: sys/dev/fxp/if_fxp.c
===================================================================
--- sys/dev/fxp/if_fxp.c	(revision 190876)
+++ sys/dev/fxp/if_fxp.c	(working copy)
@@ -1485,7 +1485,8 @@
 		 * checksum in the first frame driver should compute it.
 		 */
 		ip->ip_sum = 0;
-		ip->ip_len = htons(ifp->if_mtu);
+		ip->ip_len = htons(m->m_pkthdr.tso_segsz + (ip->ip_hl << 2) +
+		    (tcp->th_off << 2));
 		tcp->th_sum = in_pseudo(ip->ip_src.s_addr, ip->ip_dst.s_addr,
 		    htons(IPPROTO_TCP + (tcp->th_off << 2) +
 		    m->m_pkthdr.tso_segsz));

--X1bOJ3K7DJ5YkBrT--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090411034613.GA54253>