Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2007 20:53:36 -0800
From:      "Jack Vogel" <jfvogel@gmail.com>
To:        "Andre Oppermann" <andre@freebsd.org>
Cc:        Kip Macy <kip.macy@gmail.com>, freebsd-net <freebsd-net@freebsd.org>
Subject:   Re: improved TSO interface needed
Message-ID:  <2a41acea0702252053v2357b5f5tefbcf58375be1a2f@mail.gmail.com>
In-Reply-To: <45E1A3B4.7090002@freebsd.org>
References:  <b1fa29170702242255i323077e8t3e5cfe696431c50b@mail.gmail.com> <45E19B54.9060007@freebsd.org> <b1fa29170702250641w3b365a97u62f066087d1bffe8@mail.gmail.com> <45E1A3B4.7090002@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2/25/07, Andre Oppermann <andre@freebsd.org> wrote:
> Kip Macy wrote:
> > On 2/25/07, Andre Oppermann <andre@freebsd.org> wrote:
> >> Kip Macy wrote:
> >> > Evidently FreeBSD violates the LSO spec by sending down up to socket
> >> > buffer sized TSO segments to the network card. Is there a way to set
> >> > this other than reducing net.inet.tcp.sendbuf_max to a compliant value
> >> > (64k)? And is there a way to for a device to communicate to the stack
> >> > the maximum length of an mbuf chain?
> >>
> >>  From netinet/ip_output.c:
> >>
> >>           * When doing TSO limit a burst to TCP_MAXWIN minus the
> >>           * IP, TCP and Options length to keep ip->ip_len from
> >>           * overflowing.  Prevent the last segment from being
> >>           * fractional thus making them all equal sized and set
> >>           * the flag to continue sending.
> >>
> >> TCP_MAXWIN is 64K.
> >
> > It is good to know that this how it is supposed to work even if it
> > doesn't. You didn't directly answer my last question, since they're
> > all supposed to be equal does that mean the max should be 32?
>
> The current TSO code will send mbuf chains of up to 64K (minus headers)
> to be split into MSS sized packets as specified by mbuf packet header
> usually resulting in an MTU of 1500 bytes.
>
> There is no way at the moment to tell the stack to send shorter mbuf
> chain while still using TSO.
>
> A google search for "LSO" doesn't yield any useful answers.  The stack
> doesn't send socket buffer sized mbuf chains if it larger than 64K.
>
> Can you explain the problem you're seeing in more details perhaps?  That'd
> certainly help in finding a fix for your problem.

LSO is MicroSlop's term for TSO :) As usual, they rename it, and
next they do something non-standard to er 'differentiate' as the
euphemism goes...

Kinda what Sun's lawsuit back in the 90s against their Java
strategy was all about :)

Nevertheless, I don't understand Kip either, when we do TSO there
is no evidence on the wire, it still has MTU sized packets.  I fail to
see why I should care about some LSO spec, what does it break?

Jack



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