netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] tcp: remove redundant rcv_nxt update
@ 2018-07-11 13:16 Yafang Shao
  2018-07-11 13:16 ` [PATCH net-next 2/2] tcp: refactor tcp_queue_rcv Yafang Shao
  2018-07-11 17:01 ` [PATCH net-next 1/2] tcp: remove redundant rcv_nxt update Eric Dumazet
  0 siblings, 2 replies; 4+ messages in thread
From: Yafang Shao @ 2018-07-11 13:16 UTC (permalink / raw)
  To: davem, edumazet; +Cc: netdev, linux-kernel, shaoyafang, Yafang Shao

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-07-11 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-11 13:16 [PATCH net-next 1/2] tcp: remove redundant rcv_nxt update Yafang Shao
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

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).