Files
linux-stable-mirror/include/linux
Eric Dumazet cdbab62366 tcp: fix fastopen code vs usec TS
After blamed commit, TFO client-ack-dropped-then-recovery-ms-timestamps
packetdrill test failed.

David Morley and Neal Cardwell started investigating and Neal pointed
that we had :

tcp_conn_request()
  tcp_try_fastopen()
   -> tcp_fastopen_create_child
     -> child = inet_csk(sk)->icsk_af_ops->syn_recv_sock()
       -> tcp_create_openreq_child()
          -> copy req_usec_ts from req:
          newtp->tcp_usec_ts = treq->req_usec_ts;
          // now the new TFO server socket always does usec TS, no matter
          // what the route options are...
  send_synack()
    -> tcp_make_synack()
        // disable tcp_rsk(req)->req_usec_ts if route option is not present:
        if (tcp_rsk(req)->req_usec_ts < 0)
                tcp_rsk(req)->req_usec_ts = dst_tcp_usec_ts(dst);

tcp_conn_request() has the initial dst, we can initialize
tcp_rsk(req)->req_usec_ts there instead of later in send_synack();

This means tcp_rsk(req)->req_usec_ts can be a boolean.

Many thanks to David an Neal for their help.

Fixes: 614e8316aa ("tcp: add support for usec resolution in TCP TS values")
Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202310302216.f79d78bc-oliver.sang@intel.com
Suggested-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: David Morley <morleyd@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-11-03 09:16:42 +00:00
..
2023-10-05 09:13:42 -07:00
2023-09-28 12:12:07 -06:00
2023-10-24 13:08:14 -07:00
2023-10-14 10:16:31 -07:00
2023-10-11 08:46:01 -07:00
2023-09-22 08:52:13 -06:00
2023-10-19 14:47:33 -04:00
2023-10-12 09:58:02 +02:00
2023-10-11 10:11:54 -07:00
2023-10-16 12:44:06 -04:00
2023-10-16 12:44:06 -04:00
2023-10-27 10:51:41 +01:00
2023-10-11 10:11:54 -07:00
2023-10-17 21:46:33 +02:00
2023-09-29 17:20:46 -07:00
2023-10-03 21:18:13 +02:00
2023-10-06 11:01:23 +02:00
2023-10-06 11:01:23 +02:00
2023-10-15 13:19:42 +01:00
2023-11-03 09:16:42 +00:00