From patchwork Sat Oct 12 17:16:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuchung Cheng X-Patchwork-Id: 283006 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 76FCF2C0343 for ; Sun, 13 Oct 2013 04:17:23 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753183Ab3JLRRU (ORCPT ); Sat, 12 Oct 2013 13:17:20 -0400 Received: from mail-pb0-f74.google.com ([209.85.160.74]:35839 "EHLO mail-pb0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752493Ab3JLRRS (ORCPT ); Sat, 12 Oct 2013 13:17:18 -0400 Received: by mail-pb0-f74.google.com with SMTP id rq2so543459pbb.1 for ; Sat, 12 Oct 2013 10:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=YSBIMZEgVuqyP2cau1199a1sz5d28JA7LPPsF6w9FYQ=; b=cCkXgePT7f0kRy+VBGvs3DZSLhVn0z7O74B7OHYpdZkQBznhNZ2b6ZGbkDqaKJXyLT GEsq/JXCgtwpC7aGSz9dPdAZU6kondKOAmfhh54u6f2+ymcZJ4zHpoA6mWuKJ4zlTF2w 6tRhnT+/N5RkfIfYD/mcDx97X41kRT3NKJ6bsCoiNJIO2+6j8SrOi8C27InOkdIRY/AT I1uu2bvai1CfrC5yQ6UfpKUg2jioFDOi7i5nSEon+JnWeJavHpO01JMHuar7ZeGnAKJg kVLwyiRujU9Fz0CKIMPZihAngQu/0OgqORQIjygeqz+GPgtTxDGQP7IUNR/d+JOPVUse XlSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YSBIMZEgVuqyP2cau1199a1sz5d28JA7LPPsF6w9FYQ=; b=d95i7RXY0ff5vnWvrGqxWfSvvAE8SC6YAaBn3ZqbARIZm5GgynIAB/WYnrIOqpqGV6 56jVM40bfzLrols1UZzyJWqPIgxee1zPrESh+WrSsDP2tTdYKl/zk13lbt/u7nOn9o3u HrAo2aY4DtV3P0ABEq1lKdazmmPACTc6256QQ2nxtHs5n7s7P1ERkpX7NGNqNf1zDBSv 60xeoswRpMkh0G5ZUgpPYsIbXws9F64n5ytq34O2UDZPv5oPEd8I7P34HpqWkNsLoEBs XXTxs1SLc8TI3vdduhaQ+rmEvcE5vTaqjVCQAT2mMKTJJ9xIFueF5zExfI892PHAcJQ8 jiaw== X-Gm-Message-State: ALoCoQkeL+3MY64KlpZKI1BuYMU+yTQcYF1C+U5u+kPpqROoekUMzIaH45qERBARAi/0vgJ5YM1Cwm+43d66vZMn/WdHPurbMHfFn3PYqeZSAzOEeuSA2jGTSZUkpuH8YwFqiNhABtj93ahsBXrA6POrXb531UvuahU+rnFLTGNLxVHv/08PW3l5PbN8UaTNpUI1qcf6O6MarFcB+fZLYPb339v4EIrLxg== X-Received: by 10.66.5.226 with SMTP id v2mr8825633pav.22.1381598238410; Sat, 12 Oct 2013 10:17:18 -0700 (PDT) Received: from corp2gmr1-2.hot.corp.google.com (corp2gmr1-2.hot.corp.google.com [172.24.189.93]) by gmr-mx.google.com with ESMTPS id a24si3247317yhl.1.1969.12.31.16.00.00 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Sat, 12 Oct 2013 10:17:18 -0700 (PDT) Received: from blast2.mtv.corp.google.com (blast2.mtv.corp.google.com [172.17.132.164]) by corp2gmr1-2.hot.corp.google.com (Postfix) with ESMTP id 2F2B45A41A0; Sat, 12 Oct 2013 10:17:18 -0700 (PDT) Received: by blast2.mtv.corp.google.com (Postfix, from userid 5463) id C6A85220C26; Sat, 12 Oct 2013 10:17:17 -0700 (PDT) From: Yuchung Cheng To: davem@davemloft.net, ncardwell@google.com, nanditad@google.com Cc: netdev@vger.kernel.org, michael@sterretts.net, jwboyer@fedoraproject.org, sesse@google.com, dormando@rydia.net, Yuchung Cheng Subject: [PATCH net] tcp: fix incorrect ca_state in tail loss probe Date: Sat, 12 Oct 2013 10:16:27 -0700 Message-Id: <1381598187-9681-1-git-send-email-ycheng@google.com> X-Mailer: git-send-email 1.8.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On receiving an ACK that covers the loss probe sequence, TLP immediately sets the congestion state to Open, even though some packets are not recovered and retransmisssion are on the way. The later ACks may trigger a WARN_ON check in step D of tcp_fastretrans_alert(), e.g., https://bugzilla.redhat.com/show_bug.cgi?id=989251 The fix is to follow the similar procedure in recovery by calling tcp_try_keep_open(). The sender switches to Open state if no packets are retransmissted. Otherwise it goes to Disorder and let subsequent ACKs move the state to Recovery or Open. Reported-By: Michael Sterrett Tested-By: Dormando Signed-off-by: Yuchung Cheng Acked-by: Neal Cardwell Acked-by: Nandita Dukkipati --- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 113dc5f..53974c7 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3291,7 +3291,7 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) tcp_init_cwnd_reduction(sk, true); tcp_set_ca_state(sk, TCP_CA_CWR); tcp_end_cwnd_reduction(sk); - tcp_set_ca_state(sk, TCP_CA_Open); + tcp_try_keep_open(sk); NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPLOSSPROBERECOVERY); }