Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>, Van Jacobson <vanj@google.com>,
	Tom Herbert <therbert@google.com>
Subject: Re: [PATCH net-next] tcp: TSO packets automatic sizing
Date: Sun, 25 Aug 2013 19:22:39 -0700	[thread overview]
Message-ID: <1377483759.8828.104.camel@edumazet-glaptop> (raw)
In-Reply-To: <1377477425.8828.101.camel@edumazet-glaptop>

On Sun, 2013-08-25 at 17:37 -0700, Eric Dumazet wrote:
> On Sun, 2013-08-25 at 15:01 -0700, Yuchung Cheng wrote:
> 
> > Any idea to get rid of this undesirable extra RTT delay?
> 
> Its probably a bug in the push code.

For exact write/send of a multiple of MSS, I think following patch
should fix the bug.

If we filled a packet, we must send it.

For the other problem, I think its related to Nagle.

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index ab64eea..dd326f4 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1187,7 +1187,8 @@ new_segment:
 
 			from += copy;
 			copied += copy;
-			if ((seglen -= copy) == 0 && iovlen == 0)
+			seglen -= copy;
+			if (seglen == 0 && iovlen == 0 && skb->len < max)
 				goto out;
 
 			if (skb->len < max || (flags & MSG_OOB) || unlikely(tp->repair))

  reply	other threads:[~2013-08-26  2:22 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-24  0:29 [PATCH net-next] tcp: TSO packets automatic sizing Eric Dumazet
2013-08-24  3:17 ` Neal Cardwell
2013-08-24 18:56   ` Eric Dumazet
2013-08-24 20:28     ` Eric Dumazet
2013-08-25 22:01     ` Yuchung Cheng
2013-08-26  0:37       ` Eric Dumazet
2013-08-26  2:22         ` Eric Dumazet [this message]
2013-08-26  3:58           ` Eric Dumazet
2013-08-25  2:46 ` David Miller
2013-08-25  2:52   ` Eric Dumazet
2013-08-26  4:26 ` [PATCH v2 " Eric Dumazet
2013-08-26 19:09   ` Yuchung Cheng
2013-08-26 20:28     ` Eric Dumazet
2013-08-26 22:31       ` Yuchung Cheng
2013-08-27  0:47   ` Eric Dumazet
2013-08-27 12:46   ` [PATCH v3 " Eric Dumazet
2013-08-28  0:17     ` Yuchung Cheng
2013-08-28  0:21     ` Neal Cardwell
2013-08-28  7:37     ` Jason Wang
2013-08-28 10:34       ` Eric Dumazet
2013-08-30  3:02         ` Jason Wang
2013-08-29 19:51     ` David Miller
2013-08-29 20:26       ` Eric Dumazet
2013-08-29 20:35         ` David Miller
2013-08-29 21:26           ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377483759.8828.104.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    --cc=vanj@google.com \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox