* [PATCH net-next] tcp: switch snt_synack back to measuring transmit time of first SYNACK
@ 2014-06-30 19:09 Neal Cardwell
2014-07-01 8:33 ` Octavian Purdila
2014-07-08 2:26 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Neal Cardwell @ 2014-06-30 19:09 UTC (permalink / raw)
To: David Miller
Cc: netdev, Neal Cardwell, Yuchung Cheng, Octavian Purdila, Jerry Chu
Always store in snt_synack the time at which the server received the
first client SYN and attempted to send the first SYNACK.
Recent commit aa27fc501 ("tcp: tcp_v[46]_conn_request: fix snt_synack
initialization") resolved an inconsistency between IPv4 and IPv6 in
the initialization of snt_synack. This commit brings back the idea
from 843f4a55e (tcp: use tcp_v4_send_synack on first SYN-ACK), which
was going for the original behavior of snt_synack from the commit
where it was added in 9ad7c049f0f79 ("tcp: RFC2988bis + taking RTT
sample from 3WHS for the passive open side") in v3.1.
In addition to being simpler (and probably a tiny bit faster),
unconditionally storing the time of the first SYNACK attempt has been
useful because it allows calculating a performance metric quantifying
how long it took to establish a passive TCP connection.
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Cc: Octavian Purdila <octavian.purdila@intel.com>
Cc: Jerry Chu <hkchu@google.com>
---
include/net/tcp.h | 2 +-
net/ipv4/tcp_ipv4.c | 2 --
net/ipv6/tcp_ipv6.c | 2 --
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 0d5389a..c9a75db 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1093,7 +1093,7 @@ static inline void tcp_openreq_init(struct request_sock *req,
req->cookie_ts = 0;
tcp_rsk(req)->rcv_isn = TCP_SKB_CB(skb)->seq;
tcp_rsk(req)->rcv_nxt = TCP_SKB_CB(skb)->seq + 1;
- tcp_rsk(req)->snt_synack = 0;
+ tcp_rsk(req)->snt_synack = tcp_time_stamp;
req->mss = rx_opt->mss_clamp;
req->ts_recent = rx_opt->saw_tstamp ? rx_opt->rcv_tsval : 0;
ireq->tstamp_ok = rx_opt->tstamp_ok;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 5dfebd2..52d0f6a 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -838,8 +838,6 @@ static int tcp_v4_send_synack(struct sock *sk, struct dst_entry *dst,
ireq->ir_rmt_addr,
ireq->opt);
err = net_xmit_eval(err);
- if (!tcp_rsk(req)->snt_synack && !err)
- tcp_rsk(req)->snt_synack = tcp_time_stamp;
}
return err;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index bc24ee2..a97c955 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -498,8 +498,6 @@ static int tcp_v6_send_synack(struct sock *sk, struct dst_entry *dst,
skb_set_queue_mapping(skb, queue_mapping);
err = ip6_xmit(sk, skb, fl6, np->opt, np->tclass);
err = net_xmit_eval(err);
- if (!tcp_rsk(req)->snt_synack && !err)
- tcp_rsk(req)->snt_synack = tcp_time_stamp;
}
done:
--
2.0.0.526.g5318336
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] tcp: switch snt_synack back to measuring transmit time of first SYNACK
2014-06-30 19:09 [PATCH net-next] tcp: switch snt_synack back to measuring transmit time of first SYNACK Neal Cardwell
@ 2014-07-01 8:33 ` Octavian Purdila
2014-07-08 2:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Octavian Purdila @ 2014-07-01 8:33 UTC (permalink / raw)
To: Neal Cardwell; +Cc: David Miller, netdev, Yuchung Cheng, Jerry Chu
On Mon, Jun 30, 2014 at 10:09 PM, Neal Cardwell <ncardwell@google.com> wrote:
> Always store in snt_synack the time at which the server received the
> first client SYN and attempted to send the first SYNACK.
>
> Recent commit aa27fc501 ("tcp: tcp_v[46]_conn_request: fix snt_synack
> initialization") resolved an inconsistency between IPv4 and IPv6 in
> the initialization of snt_synack. This commit brings back the idea
> from 843f4a55e (tcp: use tcp_v4_send_synack on first SYN-ACK), which
> was going for the original behavior of snt_synack from the commit
> where it was added in 9ad7c049f0f79 ("tcp: RFC2988bis + taking RTT
> sample from 3WHS for the passive open side") in v3.1.
>
> In addition to being simpler (and probably a tiny bit faster),
> unconditionally storing the time of the first SYNACK attempt has been
> useful because it allows calculating a performance metric quantifying
> how long it took to establish a passive TCP connection.
>
Acked-by: Octavian Purdila <octavian.purdila@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] tcp: switch snt_synack back to measuring transmit time of first SYNACK
2014-06-30 19:09 [PATCH net-next] tcp: switch snt_synack back to measuring transmit time of first SYNACK Neal Cardwell
2014-07-01 8:33 ` Octavian Purdila
@ 2014-07-08 2:26 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-07-08 2:26 UTC (permalink / raw)
To: ncardwell; +Cc: netdev, ycheng, octavian.purdila, hkchu
From: Neal Cardwell <ncardwell@google.com>
Date: Mon, 30 Jun 2014 15:09:49 -0400
> Always store in snt_synack the time at which the server received the
> first client SYN and attempted to send the first SYNACK.
>
> Recent commit aa27fc501 ("tcp: tcp_v[46]_conn_request: fix snt_synack
> initialization") resolved an inconsistency between IPv4 and IPv6 in
> the initialization of snt_synack. This commit brings back the idea
> from 843f4a55e (tcp: use tcp_v4_send_synack on first SYN-ACK), which
> was going for the original behavior of snt_synack from the commit
> where it was added in 9ad7c049f0f79 ("tcp: RFC2988bis + taking RTT
> sample from 3WHS for the passive open side") in v3.1.
>
> In addition to being simpler (and probably a tiny bit faster),
> unconditionally storing the time of the first SYNACK attempt has been
> useful because it allows calculating a performance metric quantifying
> how long it took to establish a passive TCP connection.
>
> Signed-off-by: Neal Cardwell <ncardwell@google.com>
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-08 2:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-30 19:09 [PATCH net-next] tcp: switch snt_synack back to measuring transmit time of first SYNACK Neal Cardwell
2014-07-01 8:33 ` Octavian Purdila
2014-07-08 2:26 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.