Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp656567imm; Wed, 11 Jul 2018 08:46:52 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe7G0A+ieFIWMWuK0ZNsVN+OIfEWYQacXlm8Y36VxpHtfLR1lqe4zWRk4I5iCU1fwMDCmDV X-Received: by 2002:a17:902:ac96:: with SMTP id h22-v6mr8915117plr.17.1531324012833; Wed, 11 Jul 2018 08:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531324012; cv=none; d=google.com; s=arc-20160816; b=WMa+Ebdj3JXytbxP+hnpHaN40anxwoe7pJuxcHbIMczTBKwQf//iP8i2250ssvMzB8 vbkfHwpkVWF9gzEm0yx0NeK2mwKLcjs8o2/gyz8LUSWlYNWpPlJgOYZTtBhbLpT28fdf v5OA0u89AB4zpcJHq4dPMMZjnqw4zvNrJo/7/zvvFpop9vm3w+vTrPEv5g4V1sp1IXVE sR62u77DdCXWJ8QF/5C4yWWRmezHw0k4RESxVYMwadnwM71lQpGwTdg1GNekgkWBotgn 2tBwxiMOnz3H1X/v+nSJD2W5L5UVEvX3k6WVt6lxZDcX29nD5GxuW4clfhtj3dA+dcl6 dHow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=CX8Xwm1kKRiPW+XkpSi328+658QKGFtpL73d+Bz0VXc=; b=TtpgHiRdUtFizzk5myh4HSjTEB0xKC+FXQe3ODZcS305fM0g3yoLo/cuQbqtBMtQ2H L5ZLeFgiS2xLaDi6Ab1j8/cEU0j9bC14r8hny+gyL3GvC+/00SCYIZ0toUoVRODhlK/W VBOzGYDyh5Sd/iP4HoCrpmmbcQhmxdOO/JiMs8OIhGD81Pe+is1wTcJRjxqRLVEaTeeP /NIcvhOEdEmPoruVv2K7ihsWLdCPkVRtjMvL5H0xFw5IGuE01/00Q8uBGW1cQ3rgEKqr v6ezSMO+6fovxrWy0+hH835NFxW+f3b5y0OsKlTJAfjY+vWOVvnZIp5e3yxncN99IpUY edkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r4DmPa5U; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2-v6si19402817pls.245.2018.07.11.08.46.36; Wed, 11 Jul 2018 08:46:52 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=r4DmPa5U; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387785AbeGKNVh (ORCPT + 99 others); Wed, 11 Jul 2018 09:21:37 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:46674 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732311AbeGKNVh (ORCPT ); Wed, 11 Jul 2018 09:21:37 -0400 Received: by mail-pf0-f195.google.com with SMTP id l123-v6so18398688pfl.13; Wed, 11 Jul 2018 06:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=CX8Xwm1kKRiPW+XkpSi328+658QKGFtpL73d+Bz0VXc=; b=r4DmPa5U0+ny4AIwXGewmFFYRvKN/79P5/uUImPY8fuOqtPl34sSWG9BWFzCQ5zA9V yAiZySmH7Pr6TneVQ7YJSJDsRLRU9fkRzupNLEBeQ38RMrgKTsJFUTIbOPmDdleeJzbC AIgMB6mtbPOHiidWihOeNHSVr1hrVV6jHmKvu0az7TEErxU8qiYlafoCmCtpG/d+tnVO azA8Z6d1YzZNV7XL6Wl1q8B2mHFSfZ0vej2DtVtYgzoNBmGncoo/xSLucQqJZxkHmokW 7+1JNxcUhe88ktaQEg+8X7kiwpFyih9A23zoQBJZTNUn6ngwdDP1b/ZrE8rW4IJle7Vq EDNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CX8Xwm1kKRiPW+XkpSi328+658QKGFtpL73d+Bz0VXc=; b=MjQa/QSzmixnUCWL/xIkgaG/IVKnQYCGjy2UwcKOhL5t9MUQwQUoEptJWjAPf8pQDZ 7VyiK4zdES742N+QyeTi3OgsKqf8RAN86Kcq6D2iqPXUjv6qnJhXh3oaoOgdE4fpeQ7z coPsvks5LZOzoomwwrCr0s4oFDowsfP4e9u84gB4DFmVR9b0aedbpkdg/6uSBknb0zzI H2R0Fa6gXGfzd2j1Kah37yDFm8BHpza87AwyRvo/m8yizhdyeFMKU7HHO0Sz3Ib3IG+V PzjwyhqTOtvBp5p3MBZu1k9eYRV53KFd+lIfLs2HtNB+c27pFxiUS4e27D6MIGJFGCKx eTFw== X-Gm-Message-State: APt69E2tipT0W982iarbXpkOSSS9qdSaWi2YBiiXK/Svdul/DHmG3QJt Nsym3roRYUmH/V7d7xyjWwkMo96w X-Received: by 2002:a63:842:: with SMTP id 63-v6mr27324614pgi.406.1531315039459; Wed, 11 Jul 2018 06:17:19 -0700 (PDT) Received: from bogon.didichuxing.com ([168.63.150.120]) by smtp.gmail.com with ESMTPSA id r87-v6sm50285737pfb.1.2018.07.11.06.17.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 06:17:18 -0700 (PDT) From: Yafang Shao To: davem@davemloft.net, edumazet@google.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, shaoyafang@didichuxing.com, Yafang Shao Subject: [PATCH net-next 1/2] tcp: remove redundant rcv_nxt update Date: Wed, 11 Jul 2018 09:16:58 -0400 Message-Id: <1531315019-3553-1-git-send-email-laoar.shao@gmail.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tcp_rcv_nxt_update() is already executed in tcp_data_queue(). This line is redundant. See bellow, tcp_queue_rcv tcp_rcv_nxt_update(tcp_sk(sk), TCP_SKB_CB(skb)->end_seq); tcp_rcv_nxt_update(tp, TCP_SKB_CB(skb)->end_seq); <<<< redundant Signed-off-by: Yafang Shao --- net/ipv4/tcp_input.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 814ea43..3a54faf 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4695,7 +4695,6 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb) } eaten = tcp_queue_rcv(sk, skb, 0, &fragstolen); - tcp_rcv_nxt_update(tp, TCP_SKB_CB(skb)->end_seq); if (skb->len) tcp_event_data_recv(sk, skb); if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) -- 1.8.3.1