Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp335784imm; Sat, 14 Jul 2018 01:37:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcph2hytn0iYYg+3p7SAW9A2xBxdGT0Ejfx761wNkVZOXHOY/Yl1A7vBmAwGrCDTrcE/jqm X-Received: by 2002:a63:9d87:: with SMTP id i129-v6mr8551171pgd.395.1531557460440; Sat, 14 Jul 2018 01:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531557460; cv=none; d=google.com; s=arc-20160816; b=U8T8gAQMd0Efs6YAkA+Domxf8MBn9G4UbedTbk4o3OiXbyMbsrbHtZDub1EROrL+kP Tsl7tMyvZNenVpaIazYhEUuV9QT9t03qaPCGsOzvWYd3hr2tYG1jybtJdoLc0fJ0dozk WfCDxhYvTMTvS2qR3lwldgV7YsCP/rLmBc2O9nwlaVfsm9H8+FL/xfNArbOMFubYcUJ2 VE2o2cVP+JGnaHEyUTuiMGZMd1P5mxUKBkKbeDFLL+vu9L4fjlf851v3jBi43W1s5kYm +EPTu/aoyf57/jWJp/CKjuIMi7GDZ7Slcsy2dQThprg8rmNLKq82Dh6QfKK+n5eMymEk dGTQ== 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=DvRb1rIWLnSOUlEWxvv62Cz+83ZDoIyaEK8j/+Yn7Vs=; b=mNJ0abwk1ie55tp2NK9MRl1c+d2aoEEAIijYqeDFB0kasOFtSj6CtSBhQ3YX/1aIfy sMZ/YgAZHZUMr+FVoqIbX1aafG3wdWiEFtrEcqxva1hCj8KINFzGLpZRNMiccnfF6wyh avv6zsyvnPVZpbJnTz6IzNnjT33pRG45yc6Izn4lesWSfIfQEL6GgtrpazyuUS3vahn/ VOnt8d2ATeR5Di4hIeCKgaOmukgRq/xhq+PPp8dz5vffcfMnb4HycqlSoHrUzMBVMVcH vgjreeq90S9xU2bIQTdfiA+ZC9HqXToWTsdR7HCBCCBTeQBpUw4yJ6t+NZnvdut75xeg KHzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=p9SkAG8P; 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 q23-v6si25184049pgl.275.2018.07.14.01.37.25; Sat, 14 Jul 2018 01:37:40 -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=p9SkAG8P; 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 S1727276AbeGNIzK (ORCPT + 99 others); Sat, 14 Jul 2018 04:55:10 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:45712 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbeGNIzK (ORCPT ); Sat, 14 Jul 2018 04:55:10 -0400 Received: by mail-pg1-f193.google.com with SMTP id n9-v6so5443756pgp.12; Sat, 14 Jul 2018 01:36:51 -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=DvRb1rIWLnSOUlEWxvv62Cz+83ZDoIyaEK8j/+Yn7Vs=; b=p9SkAG8PcM7OhuuR2yfHXrgCIBjWje+HHeoEl0wWAztydYHosFSS5GG5ph6HuB1EiE ivZWQAg5M7Og5DoZJCTVc5xvn/LyDxhP7vQ1aXTn0cDNlS4R9enAspElLwXY6+AVR+/c kphxV7Ks/mYq2UErvsuVPiqBbWCiK8gOF8Z2+0xCTrIWc9J/IcshKn+VX7ZXCP1durs9 CtyZoJniO0mvebmMjdDsdf6wb4YNMeYDjYA1p9XnHYr+qWaaLjK6i5yn+stKZUk+CzmT E5i6daLmHqrIiKsFwQt2+TN9r2YB7tl1nLW+prL3S+XAEr2Lx4mEn4BwMnjNudEqo1qK EmzA== 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=DvRb1rIWLnSOUlEWxvv62Cz+83ZDoIyaEK8j/+Yn7Vs=; b=d7bpirPghAW5FvbZ+Iy7cpxTgkgzMKWJScXdmJpk/jCbUGbJTptiP0pnsoaxoWdJ9h oXFEoSFRjVIvPmXVjEt1NdMQFHyOP+owF/EySoat2S0UFJ435iL6IvFXVrwgkumzhsjb sMmWi4wydp13PUg0VS3za69zdxfv8qAPVSvLFCXypAw96oTIQl7TWdVG3pnFW2OdjJOL hOXjRS6nbP+IfdOTYnJ3ZcUom0GOnAuXD/bibKo4bSFQmjTKsaalLgVqWdkX//jLCvGs O/UqunicvG1XPpUoz6FYd+H0HgANDk0sS3BK2wEnNXk1HdqgKzFIINJdSch3Fuxo0/A/ RcXA== X-Gm-Message-State: AOUpUlETfuPDSM/2owSkmRGLOLsn/aS1cJFwaJGLaOJnkTHR1oKnKxQN O4kFpu6TJ/vV8leISIulXeV24olT X-Received: by 2002:a65:60d2:: with SMTP id r18-v6mr8953717pgv.306.1531557411192; Sat, 14 Jul 2018 01:36:51 -0700 (PDT) Received: from bogon.didichuxing.com ([168.63.150.120]) by smtp.gmail.com with ESMTPSA id p66-v6sm39188874pfd.65.2018.07.14.01.36.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jul 2018 01:36:50 -0700 (PDT) From: Yafang Shao To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, shaoyafang@didichuxing.com, Yafang Shao , Eric Dumazet Subject: [PATCH net-next] tcp: remove redundant rcv_nxt update Date: Sat, 14 Jul 2018 16:36:29 +0800 Message-Id: <1531557390-12592-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 Signed-off-by: Eric Dumazet --- 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