netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
To: netdev@vger.kernel.org
Cc: ilpo.jarvinen@helsinki.fi,
	Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>,
	Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Subject: [PATCH] tcp: Fix tcp_mark_head_lost() with packets == 0
Date: Wed, 17 Mar 2010 13:16:29 +0100	[thread overview]
Message-ID: <1268828189-22182-1-git-send-email-lennart.schulte@nets.rwth-aachen.de> (raw)

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


             reply	other threads:[~2010-03-17 12:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-17 12:16 Lennart Schulte [this message]
2010-03-20  5:44 ` [PATCH] tcp: Fix tcp_mark_head_lost() with packets == 0 David Miller

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=1268828189-22182-1-git-send-email-lennart.schulte@nets.rwth-aachen.de \
    --to=lennart.schulte@nets.rwth-aachen.de \
    --cc=hannemann@nets.rwth-aachen.de \
    --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).