diff options
author | Sebastien Roy <seb@delphix.com> | 2015-05-29 13:47:23 -0400 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2019-08-19 22:32:46 +0000 |
commit | a2f04351e04971ab0879872d264d6038c156b860 (patch) | |
tree | cd6640900e1adf19b745c5f8e796a0e97c7a8ee7 /usr/src/uts/common/inet/tcp/tcp.c | |
parent | c12492cf73149aa0aa845af5d59966b0eb5aa910 (diff) | |
download | illumos-joyent-a2f04351e04971ab0879872d264d6038c156b860.tar.gz |
11547 Want connstat(1M) command to display per-connection TCP statistics
Portions contributed by: Cody Peter Mello <cody.mello@joyent.com>
Portions contributed by: Ahmed G <ahmedg@delphix.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/uts/common/inet/tcp/tcp.c')
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp.c b/usr/src/uts/common/inet/tcp/tcp.c index ee1d75924e..d7458c8eee 100644 --- a/usr/src/uts/common/inet/tcp/tcp.c +++ b/usr/src/uts/common/inet/tcp/tcp.c @@ -1231,11 +1231,6 @@ tcp_closei_local(tcp_t *tcp) if (!TCP_IS_SOCKET(tcp)) tcp_acceptor_hash_remove(tcp); - TCPS_UPDATE_MIB(tcps, tcpHCInSegs, tcp->tcp_ibsegs); - tcp->tcp_ibsegs = 0; - TCPS_UPDATE_MIB(tcps, tcpHCOutSegs, tcp->tcp_obsegs); - tcp->tcp_obsegs = 0; - /* * This can be called via tcp_time_wait_processing() if TCP gets a * SYN with sequence number outside the TIME-WAIT connection's @@ -1904,15 +1899,6 @@ tcp_reinit(tcp_t *tcp) /* Cancel outstanding timers */ tcp_timers_stop(tcp); - /* - * Reset everything in the state vector, after updating global - * MIB data from instance counters. - */ - TCPS_UPDATE_MIB(tcps, tcpHCInSegs, tcp->tcp_ibsegs); - tcp->tcp_ibsegs = 0; - TCPS_UPDATE_MIB(tcps, tcpHCOutSegs, tcp->tcp_obsegs); - tcp->tcp_obsegs = 0; - tcp_close_mpp(&tcp->tcp_xmit_head); if (tcp->tcp_snd_zcopy_aware) tcp_zcopy_notify(tcp); @@ -2084,9 +2070,6 @@ tcp_reinit_values(tcp_t *tcp) tcp->tcp_swnd = 0; DONTCARE(tcp->tcp_cwnd); /* Init in tcp_process_options */ - ASSERT(tcp->tcp_ibsegs == 0); - ASSERT(tcp->tcp_obsegs == 0); - if (connp->conn_ht_iphc != NULL) { kmem_free(connp->conn_ht_iphc, connp->conn_ht_iphc_allocated); connp->conn_ht_iphc = NULL; @@ -2178,6 +2161,8 @@ tcp_reinit_values(tcp_t *tcp) DONTCARE(tcp->tcp_rtt_sa); /* Init in tcp_init_values */ DONTCARE(tcp->tcp_rtt_sd); /* Init in tcp_init_values */ tcp->tcp_rtt_update = 0; + tcp->tcp_rtt_sum = 0; + tcp->tcp_rtt_cnt = 0; DONTCARE(tcp->tcp_swl1); /* Init in case TCPS_LISTEN/TCPS_SYN_SENT */ DONTCARE(tcp->tcp_swl2); /* Init in case TCPS_LISTEN/TCPS_SYN_SENT */ |