Print this page
DLPX-43064 include high-resolution round-trip times in connstat (EP-652)
DLPX-42721 Create inline function for TCP RTO calculation
*** 20,29 ****
--- 20,30 ----
*/
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright 2016 Joyent, Inc.
+ * Copyright (c) 2016 by Delphix. All rights reserved.
*/
#include <sys/types.h>
#include <sys/stream.h>
#define _SUN_TPI_VERSION 2
*** 972,984 ****
tcp_wput_data(tcp, NULL, B_FALSE);
}
tcp->tcp_cork = onoff;
}
break;
! case TCP_RTO_INITIAL: {
! clock_t rto;
!
if (checkonly || val == 0)
break;
/*
* Sanity checks
--- 973,983 ----
tcp_wput_data(tcp, NULL, B_FALSE);
}
tcp->tcp_cork = onoff;
}
break;
! case TCP_RTO_INITIAL:
if (checkonly || val == 0)
break;
/*
* Sanity checks
*** 1004,1022 ****
* really affect anything.
*/
if (tcp->tcp_state >= TCPS_SYN_SENT)
break;
! tcp->tcp_rtt_sa = tcp->tcp_rto_initial << 2;
! tcp->tcp_rtt_sd = tcp->tcp_rto_initial >> 1;
! rto = (tcp->tcp_rtt_sa >> 3) + tcp->tcp_rtt_sd +
! tcps->tcps_rexmit_interval_extra +
! (tcp->tcp_rtt_sa >> 5) +
! tcps->tcps_conn_grace_period;
! TCP_SET_RTO(tcp, rto);
break;
- }
case TCP_RTO_MIN:
if (checkonly || val == 0)
break;
if (val < tcps->tcps_rexmit_interval_min_low ||
--- 1003,1016 ----
* really affect anything.
*/
if (tcp->tcp_state >= TCPS_SYN_SENT)
break;
! tcp->tcp_rtt_sa = MSEC2NSEC(tcp->tcp_rto_initial) << 2;
! tcp->tcp_rtt_sd = MSEC2NSEC(tcp->tcp_rto_initial) >> 1;
! tcp->tcp_rto = tcp_calculate_rto(tcp, tcps);
break;
case TCP_RTO_MIN:
if (checkonly || val == 0)
break;
if (val < tcps->tcps_rexmit_interval_min_low ||