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_fusion.c | |
parent | c12492cf73149aa0aa845af5d59966b0eb5aa910 (diff) | |
download | illumos-gate-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_fusion.c')
-rw-r--r-- | usr/src/uts/common/inet/tcp/tcp_fusion.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp_fusion.c b/usr/src/uts/common/inet/tcp/tcp_fusion.c index 6acc02d769..e73c34de34 100644 --- a/usr/src/uts/common/inet/tcp/tcp_fusion.c +++ b/usr/src/uts/common/inet/tcp/tcp_fusion.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015 by Delphix. All rights reserved. */ #include <sys/types.h> @@ -645,14 +646,16 @@ tcp_fuse_output(tcp_t *tcp, mblk_t *mp, uint32_t send_size) peer_tcp->tcp_rack = peer_tcp->tcp_rnxt; TCPS_BUMP_MIB(tcps, tcpOutDataSegs); + TCPS_BUMP_MIB(tcps, tcpHCOutSegs); TCPS_UPDATE_MIB(tcps, tcpOutDataBytes, send_size); + tcp->tcp_cs.tcp_out_data_bytes += send_size; + tcp->tcp_cs.tcp_out_data_segs++; TCPS_BUMP_MIB(tcps, tcpHCInSegs); TCPS_BUMP_MIB(tcps, tcpInDataInorderSegs); TCPS_UPDATE_MIB(tcps, tcpInDataInorderBytes, send_size); - - BUMP_LOCAL(tcp->tcp_obsegs); - BUMP_LOCAL(peer_tcp->tcp_ibsegs); + peer_tcp->tcp_cs.tcp_in_data_inorder_bytes += send_size; + peer_tcp->tcp_cs.tcp_in_data_inorder_segs++; DTRACE_TCP5(send, void, NULL, ip_xmit_attr_t *, connp->conn_ixa, __dtrace_tcp_void_ip_t *, NULL, tcp_t *, tcp, |