From a2f04351e04971ab0879872d264d6038c156b860 Mon Sep 17 00:00:00 2001 From: Sebastien Roy Date: Fri, 29 May 2015 13:47:23 -0400 Subject: 11547 Want connstat(1M) command to display per-connection TCP statistics Portions contributed by: Cody Peter Mello Portions contributed by: Ahmed G Reviewed by: Jason King Reviewed by: Robert Mustacchi Reviewed by: Dan McDonald Approved by: Richard Lowe --- usr/src/uts/common/inet/tcp/tcp_fusion.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'usr/src/uts/common/inet/tcp/tcp_fusion.c') 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 @@ -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, -- cgit v1.2.3