Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17471581ybl; Thu, 2 Jan 2020 06:08:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxqH83rE1oakuNoxKQsjjWqnBGgsVHrlsMmrvkqSTiAz5d71ec5c4v0EHOMzwHa02BYax4h X-Received: by 2002:a05:6830:ce:: with SMTP id x14mr78077061oto.289.1577974139434; Thu, 02 Jan 2020 06:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577974139; cv=none; d=google.com; s=arc-20160816; b=QgSxZ5I0lyJupJwY9+eOfLjM54blleIN9qTqlcFJcNtO/OmIvoA6ylrBOYsLb24dFC NYEdw1JIGrTvtQGLxKbH0ia3QPYMy58COu9FxTD/lcoChoB8D59eWL5L1wJhAsH51c8l xZF7etZZAsdTZh0v/LX2HuU0LoeM7vywKcfdkGHiiTh3vnf6ml2X+sXgmfpyAqwL4wFN ZWx+2kcv2M78kVGm3oK2bMn9N0c4uGJmnEKgib0FZBdmgWHx/svRTpu2pfG4AIzSU+Jo 5P2xutwR7MpXg/ETmMJ34IKGaZX37ZHJduEonGXuDoJ/kDhX00Gl4ieeLy9WGk1N6toL GSRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jNxP9iIP1ptydsyLnvAVAGYj2DAKwqD9zVS/UDmQeaQ=; b=lWbpcOrwIqp4sWjhIz5ufufuqG2LV0IAH2pyvuz5vw6kaGrZJpt+6LhM+2k1yuNZ6M WYFcofXhiGTuxH30SkFqh37hLFlcLVioHCo4uH309cs1cc7vr4oYJLh6HVShQrhY27+h eCX807S8RN8vW/Gnvp/f48nS0rW00dCC9lgxFugzuNoI/Us+CI1asd9qHtl1sn2AZbuR yaOv5RKHdQrlEwbgvIIhkE2pa/lBeNkU1zIDx2lfewgtJ1l/v8JqtKR371IjV+KZrS55 CBVCe4xU3T1b94QmSflC9LML9JJeoHqfg++ELPfOnmMgt74UPI2/0dzC2+KdEZRNzIPB F/ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si27736319otj.79.2020.01.02.06.08.47; Thu, 02 Jan 2020 06:08:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728516AbgABOHD (ORCPT + 99 others); Thu, 2 Jan 2020 09:07:03 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:58480 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728288AbgABOHC (ORCPT ); Thu, 2 Jan 2020 09:07:02 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E4515439ADF421E9329E; Thu, 2 Jan 2020 22:06:58 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Thu, 2 Jan 2020 22:06:53 +0800 From: Mao Wenan To: , , , CC: , , Subject: [PATCH net-next] tcp: use REXMIT_NEW instead of magic number Date: Thu, 2 Jan 2020 22:02:27 +0800 Message-ID: <20200102140227.77780-1-maowenan@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org REXMIT_NEW is a macro for "FRTO-style transmit of unsent/new packets", this patch makes it more readable. Signed-off-by: Mao Wenan --- 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 88b987ca9ebb..1d1e3493965f 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3550,7 +3550,7 @@ static void tcp_xmit_recovery(struct sock *sk, int rexmit) if (rexmit == REXMIT_NONE || sk->sk_state == TCP_SYN_SENT) return; - if (unlikely(rexmit == 2)) { + if (unlikely(rexmit == REXMIT_NEW)) { __tcp_push_pending_frames(sk, tcp_current_mss(sk), TCP_NAGLE_OFF); if (after(tp->snd_nxt, tp->high_seq)) -- 2.20.1