[PATCH net-next 06/17] tcp: fix corner case issue in segmentation during rexmitting

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ilpo Järvinen
Date: Saturday, February 28, 2009 - 7:44 am

From: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>

If cur_mss grew very recently so that the previously G/TSOed skb
now fits well into a single segment it would get send up in
parts unless we calculate # of segments again. This corner-case
could happen eg. after mtu probe completes or less than
previously sack blocks are required for the opposite direction.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
 net/ipv4/tcp_output.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 3feab4d..77af7fa 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1921,6 +1921,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
 	if (skb->len > cur_mss) {
 		if (tcp_fragment(sk, skb, cur_mss, cur_mss))
 			return -ENOMEM; /* We'll try again later. */
+	} else {
+		tcp_init_tso_segs(sk, skb, cur_mss);
 	}
 
 	tcp_retrans_try_collapse(sk, skb, cur_mss);
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/17]: tcp &amp; more tcp, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-2.6 01/17] tcp: fix retrans_out leaks, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 02/17] tcp: don't backtrack to sacked skbs, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 03/17] tcp: fix lost_cnt_hint miscounts, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 06/17] tcp: fix corner case issue in segme ..., Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 11/17] htcp: merge icsk_ca_state compare, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 12/17] tcp: add helper for AI algorithm, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 14/17] tcp: remove pointless .dsack code, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
Re: [PATCH net-2.6 01/17] tcp: fix retrans_out leaks, David Miller, (Sun Mar 1, 1:22 am)