netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: Fix tcp_mark_head_lost() with packets == 0
@ 2010-03-17 12:16 Lennart Schulte
  2010-03-20  5:44 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Lennart Schulte @ 2010-03-17 12:16 UTC (permalink / raw)
  To: netdev; +Cc: ilpo.jarvinen, Lennart Schulte, Arnd Hannemann

A packet is marked as lost in case packets == 0, although nothing should be done.
This results in a too early retransmitted packet during recovery in some cases.
This small patch fixes this issue by returning immediately.

Signed-off-by: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
---
 net/ipv4/tcp_input.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 788851c..c096a42 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2511,6 +2511,9 @@ static void tcp_mark_head_lost(struct sock *sk, int packets)
 	int err;
 	unsigned int mss;
 
+	if (packets == 0)
+		return;
+
 	WARN_ON(packets > tp->packets_out);
 	if (tp->lost_skb_hint) {
 		skb = tp->lost_skb_hint;
-- 
1.6.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tcp: Fix tcp_mark_head_lost() with packets == 0
  2010-03-17 12:16 [PATCH] tcp: Fix tcp_mark_head_lost() with packets == 0 Lennart Schulte
@ 2010-03-20  5:44 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-20  5:44 UTC (permalink / raw)
  To: lennart.schulte; +Cc: netdev, ilpo.jarvinen, hannemann

From: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Date: Wed, 17 Mar 2010 13:16:29 +0100

> A packet is marked as lost in case packets == 0, although nothing should be done.
> This results in a too early retransmitted packet during recovery in some cases.
> This small patch fixes this issue by returning immediately.
> 
> Signed-off-by: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
> Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-20  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17 12:16 [PATCH] tcp: Fix tcp_mark_head_lost() with packets == 0 Lennart Schulte
2010-03-20  5:44 ` David Miller

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).