From: Yafang Shao <laoar.shao@gmail.com>
To: davem@davemloft.net, edumazet@google.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
shaoyafang@didichuxing.com, Yafang Shao <laoar.shao@gmail.com>
Subject: [PATCH net-next 1/2] tcp: remove redundant rcv_nxt update
Date: Wed, 11 Jul 2018 09:16:58 -0400 [thread overview]
Message-ID: <1531315019-3553-1-git-send-email-laoar.shao@gmail.com> (raw)
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 <laoar.shao@gmail.com>
---
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
next reply other threads:[~2018-07-11 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 13:16 Yafang Shao [this message]
2018-07-11 13:16 ` [PATCH net-next 2/2] tcp: refactor tcp_queue_rcv Yafang Shao
2018-07-11 14:56 ` Eric Dumazet
2018-07-11 17:01 ` [PATCH net-next 1/2] tcp: remove redundant rcv_nxt update Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531315019-3553-1-git-send-email-laoar.shao@gmail.com \
--to=laoar.shao@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shaoyafang@didichuxing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).