From: Li Yu <raise.sail@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
davem@davemloft.net, ilpo.jarvinen@helsinki.fi
Subject: [PATCH] fix pushed_seq in keepalive / zero window probe timer
Date: Mon, 22 Aug 2011 14:57:21 +0800 [thread overview]
Message-ID: <4E51FDD1.2010607@gmail.com> (raw)
In tcp_write_wakeup(), we may split the probe segment since send window or mss is larger than it.
so I think that we should update tp->pushed_seq after tcp_fragment(), is it right? thanks.
Signed-off-by: Li Yu <raise.sail@gmail.com>
CC: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
CC: David S. Miller <davem@davemloft.net>
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 882e0b0..659a71f 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2784,9 +2784,6 @@ int tcp_write_wakeup(struct sock *sk)
unsigned int mss = tcp_current_mss(sk);
unsigned int seg_size = tcp_wnd_end(tp) - TCP_SKB_CB(skb)->seq;
- if (before(tp->pushed_seq, TCP_SKB_CB(skb)->end_seq))
- tp->pushed_seq = TCP_SKB_CB(skb)->end_seq;
-
/* We are probing the opening of a window
* but the window size is != 0
* must have been a result SWS avoidance ( sender )
@@ -2803,8 +2800,11 @@ int tcp_write_wakeup(struct sock *sk)
TCP_SKB_CB(skb)->flags |= TCPHDR_PSH;
TCP_SKB_CB(skb)->when = tcp_time_stamp;
err = tcp_transmit_skb(sk, skb, 1, GFP_ATOMIC);
- if (!err)
+ if (!err) {
tcp_event_new_data_sent(sk, skb);
+ if (before(tp->pushed_seq, TCP_SKB_CB(skb)->end_seq))
+ tp->pushed_seq = TCP_SKB_CB(skb)->end_seq;
+ }
return err;
} else {
if (between(tp->snd_up, tp->snd_una + 1, tp->snd_una + 0xFFFF))
next reply other threads:[~2011-08-22 6:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-22 6:57 Li Yu [this message]
2011-08-22 11:25 ` [PATCH] fix pushed_seq in keepalive / zero window probe timer Eric Dumazet
2011-08-22 13:41 ` Li Yu
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=4E51FDD1.2010607@gmail.com \
--to=raise.sail@gmail.com \
--cc=davem@davemloft.net \
--cc=ilpo.jarvinen@helsinki.fi \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).