From patchwork Mon Mar 23 15:13:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Dykstra X-Patchwork-Id: 24920 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id BE27EDDF66 for ; Tue, 24 Mar 2009 02:13:44 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757429AbZCWPNi (ORCPT ); Mon, 23 Mar 2009 11:13:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757413AbZCWPNh (ORCPT ); Mon, 23 Mar 2009 11:13:37 -0400 Received: from rv-out-0506.google.com ([209.85.198.239]:22626 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757010AbZCWPNg (ORCPT ); Mon, 23 Mar 2009 11:13:36 -0400 Received: by rv-out-0506.google.com with SMTP id f9so1810723rvb.1 for ; Mon, 23 Mar 2009 08:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=Bb5tEzwbPkf8Dnh2F1KbXEGAO7d01SCfI+6K6swZE+4=; b=EiIx0JbJnBYUg8iz4GDRhqOOy5031vQBh4Enn5Kol/Avoe7f/Go0CpQ84ubuIyfO/c MiNSAkbQIO/7xQySym0/vVpo7M/WNIwVOcYRmh6zL/5zKvaKYYhfePgki7D6jGsrkEBU kiVl6Yue6DjPuUz1N33PJaORjpW5W5durlUm4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=kdxHpxWpEWVZMXA3hJLu20f2a3y+Pb+bBQNn3nMgKv2UMhmBrdI3KvpzpG7ATiQtAG L1Hv6Z64CdYwjxwFKZrjpywu5gEvqzgaK355IQWHMCsNaBI8a+L7Bvn49sTGfHhnuNxU FIP6z0PPezP4HrBkjeVkwLh6kAawz1s8dORV0= Received: by 10.114.88.1 with SMTP id l1mr4878577wab.9.1237821215331; Mon, 23 Mar 2009 08:13:35 -0700 (PDT) Received: from ?192.168.221.201? (c-24-118-80-156.hsd1.mn.comcast.net [24.118.80.156]) by mx.google.com with ESMTPS id j39sm5367944waf.28.2009.03.23.08.13.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Mar 2009 08:13:34 -0700 (PDT) Subject: Re: [PATCH net-next-2.6] Re: TCP/IP stack interpretation of acceptable packet From: John Dykstra To: Andi Kleen Cc: David Miller , mailinglists+netdev@oliverzheng.com, netdev@vger.kernel.org In-Reply-To: <20090323122806.GA11935@one.firstfloor.org> References: <2ff60cd60902241459q1de39054lb3dc5233f13b69c3@mail.gmail.com> <1237423493.32009.31.camel@Maple> <20090322.215033.192091282.davem@davemloft.net> <20090323122806.GA11935@one.firstfloor.org> Date: Mon, 23 Mar 2009 10:13:31 -0500 Message-Id: <1237821211.7142.17.camel@Maple> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.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 --- 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: