[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0811051414250.23792@wrl-59.cs.helsinki.fi>
Date: Wed, 5 Nov 2008 14:25:57 +0200 (EET)
From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To: David Miller <davem@...emloft.net>
cc: zbr@...emap.net, Netdev <netdev@...r.kernel.org>, efault@....de,
mingo@...e.hu, a.p.zijlstra@...llo.nl,
Herbert Xu <herbert@...dor.apana.org.au>
Subject: Re: tbench wrt. loopback TSO
On Wed, 5 Nov 2008, David Miller wrote:
> From: "Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
> Date: Wed, 5 Nov 2008 14:04:14 +0200 (EET)
>
> > On Wed, 5 Nov 2008, David Miller wrote:
> >
> > > From: Evgeniy Polyakov <zbr@...emap.net>
> > > Date: Wed, 5 Nov 2008 14:49:00 +0300
> > >
> > > > But what if we just remove that trimming at all? This may result in
> > > > a not fully filled tso frame, but who cares if we copy data from
> > > > userspace anyway, will add another potentially small copy at sending
> > > > time?
> > >
> > > Ok, the only part I care about is whether taking away this modulus
> > > will result in a sub-MSS sized packet on the wire, which is
> > > undesirable.
> > >
> > > The send logic will prevent this, right?
> >
> > I don't see what currently would do that. We'd need to resegment skbs
> > there then...
>
> Look at tcp_mss_split_point() in tcp_output.c
>
> I think it ends up doing exactly this.
>
> 'needed' is set to min(skb->len, window)
>
> and the return value is "needed - (needed % mss_now)"
>
> The caller splits up the TSO segment as needed to satisfy this
> returned limit.
>
> That should effectively chop off the sub-mss part.
Yes yes, I know as I wrote that part :-). But how does it prevent sub-MSS
on wire?
Answer: It is intented for different case and doesn't prevent sub-MSS
segments but solves some window limitation issues! It just makes sure
we won't add yet another sub-mss segment because of splitting we anyway
are forced to.
In case of curr_mss != write_time_mss, we'll be sending those < mss
segments per each skb, normally this happens over a single rtt so it's not
that bad problem (and btw, that modulo won't even be executed if you have
enough window but the splitting happens on a layer below, except for the
last segment of course where we'd do nagle).
The problem is that we'd need to _resegment with the next skb_ since the
mss boundary and skb boundary would basically constantly be running
out-of-sync. That won't get done currently by anything.
--
i.
Powered by blists - more mailing lists