Print this page
11546 Track TCP round-trip time in nanoseconds
Portions contributed by: Cody Peter Mello <cody.mello@joyent.com>
Portions contributed by: Brandon Baker <bbaker@delphix.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>

*** 19,28 **** --- 19,30 ---- * CDDL HEADER END */ /* * 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
*** 867,879 **** 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 --- 869,879 ---- tcp_wput_data(tcp, NULL, B_FALSE); } tcp->tcp_cork = onoff; } break; ! case TCP_RTO_INITIAL: if (checkonly || val == 0) break; /* * Sanity checks
*** 899,917 **** * 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 || --- 899,913 ---- * 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, ! tcps->tcps_conn_grace_period); break; case TCP_RTO_MIN: if (checkonly || val == 0) break; if (val < tcps->tcps_rexmit_interval_min_low ||