aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorWei Wang <weiwan@google.com>2017-10-04 13:04:04 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-06 00:10:16 -0400
commit6d05081e55a5a55b32ae6609f1902eca8277541d (patch)
treedd1e2af036946ad53dcc4a32143f70dc494ac55b /net/ipv4/tcp_input.c
parent27204aaa9dc67b833b77179fdac556288ec3a4bf (diff)
tcp: clean up TFO server's initial tcp_rearm_rto() call
This commit does a cleanup and moves tcp_rearm_rto() call in the TFO server case into a previous spot in tcp_rcv_state_process() to make it more compact. This is only a cosmetic change. Suggested-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Wei Wang <weiwan@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index bd3a35f5dbf2..c5b8d61846c2 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5911,6 +5911,15 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
5911 if (req) { 5911 if (req) {
5912 inet_csk(sk)->icsk_retransmits = 0; 5912 inet_csk(sk)->icsk_retransmits = 0;
5913 reqsk_fastopen_remove(sk, req, false); 5913 reqsk_fastopen_remove(sk, req, false);
5914 /* Re-arm the timer because data may have been sent out.
5915 * This is similar to the regular data transmission case
5916 * when new data has just been ack'ed.
5917 *
5918 * (TFO) - we could try to be more aggressive and
5919 * retransmitting any data sooner based on when they
5920 * are sent out.
5921 */
5922 tcp_rearm_rto(sk);
5914 } else { 5923 } else {
5915 tcp_init_transfer(sk, BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB); 5924 tcp_init_transfer(sk, BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB);
5916 tp->copied_seq = tp->rcv_nxt; 5925 tp->copied_seq = tp->rcv_nxt;
@@ -5933,18 +5942,6 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
5933 if (tp->rx_opt.tstamp_ok) 5942 if (tp->rx_opt.tstamp_ok)
5934 tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; 5943 tp->advmss -= TCPOLEN_TSTAMP_ALIGNED;
5935 5944
5936 if (req) {
5937 /* Re-arm the timer because data may have been sent out.
5938 * This is similar to the regular data transmission case
5939 * when new data has just been ack'ed.
5940 *
5941 * (TFO) - we could try to be more aggressive and
5942 * retransmitting any data sooner based on when they
5943 * are sent out.
5944 */
5945 tcp_rearm_rto(sk);
5946 }
5947
5948 if (!inet_csk(sk)->icsk_ca_ops->cong_control) 5945 if (!inet_csk(sk)->icsk_ca_ops->cong_control)
5949 tcp_update_pacing_rate(sk); 5946 tcp_update_pacing_rate(sk);
5950 5947