netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Dykstra <john.dykstra1@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: David Miller <davem@davemloft.net>,
	mailinglists+netdev@oliverzheng.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] Re: TCP/IP stack interpretation of acceptable packet
Date: Mon, 23 Mar 2009 10:13:31 -0500	[thread overview]
Message-ID: <1237821211.7142.17.camel@Maple> (raw)
In-Reply-To: <20090323122806.GA11935@one.firstfloor.org>

On Sun, 2009-03-22 at 21:50 -0700, David Miller wrote:
> I've been mulling over this patch for more than a week :-)

FWIW, FreeBSD 6.1 discards segments with these over-eager acknowledgment
fields.  It also sends back the pure ACK that I chose not to add.  

I didn't look at any other OS's.

On Mon, 2009-03-23 at 13:28 +0100, Andi Kleen wrote:
> One thing that might be useful for the testing period would 
> be explicit printk when such a new discard happens? 

[PATCH net-next-2.6]  tcp: Log discarded segments with too-high ack fields

Log a rate-limited message when a TCP segment is discarded because
its ack field is beyond the last data sent.  This logging was suggested
by Andi Kleen.

Signed-off-by: John Dykstra <john.dykstra1@gmail.com>
---
 net/ipv4/tcp_input.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 01544cd..37343e4 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3690,7 +3690,9 @@ no_queue:
 	return 1;
 
 invalid_ack:
-	SOCK_DEBUG(sk, "Ack %u after %u:%u\n", ack, tp->snd_una, tp->snd_nxt);
+	if (printk_ratelimit())
+		printk(KERN_NOTICE "Ack %u after %u:%u;  segment discarded\n",
+		    ack, tp->snd_una, tp->snd_nxt);
 	return -1;
 	
 old_ack:
-- 
1.5.4.3




  reply	other threads:[~2009-03-23 15:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24 22:59 TCP/IP stack interpretation of acceptable packet Oliver Zheng
2009-02-28 15:50 ` Andi Kleen
2009-03-19  0:44 ` [PATCH net-next-2.6] " John Dykstra
2009-03-19  1:47   ` Oliver Zheng
2009-03-23  4:50   ` David Miller
2009-03-23 12:28     ` Andi Kleen
2009-03-23 15:13       ` John Dykstra [this message]
2009-03-23 18:58       ` 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=1237821211.7142.17.camel@Maple \
    --to=john.dykstra1@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=davem@davemloft.net \
    --cc=mailinglists+netdev@oliverzheng.com \
    --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).