tcp: extract code to compute SYNACK RTT
In preparation for adding another spot where we compute the SYNACK RTT, extract this code so that it can be shared. Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
de46584675
commit
623df484a7
@@ -1137,6 +1137,15 @@ static inline void tcp_openreq_init(struct request_sock *req,
|
||||
ireq->loc_port = tcp_hdr(skb)->dest;
|
||||
}
|
||||
|
||||
/* Compute time elapsed between SYNACK and the ACK completing 3WHS */
|
||||
static inline void tcp_synack_rtt_meas(struct sock *sk,
|
||||
struct request_sock *req)
|
||||
{
|
||||
if (tcp_rsk(req)->snt_synack)
|
||||
tcp_valid_rtt_meas(sk,
|
||||
tcp_time_stamp - tcp_rsk(req)->snt_synack);
|
||||
}
|
||||
|
||||
extern void tcp_enter_memory_pressure(struct sock *sk);
|
||||
|
||||
static inline int keepalive_intvl_when(const struct tcp_sock *tp)
|
||||
|
Reference in New Issue
Block a user