Print this page
917 Make TCP's iss_incr a tunable
@@ -19,10 +19,11 @@
* CDDL HEADER END
*/
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, Joyent Inc. All rights reserved.
*/
/*
* This file contains functions related to TCP time wait processing. Also
* refer to the time wait handling comments in tcp_impl.h.
@@ -508,15 +509,15 @@
}
if ((flags & TH_SYN) && gap > 0 && rgap < 0) {
/*
* Make sure that when we accept the connection, pick
- * an ISS greater than (tcp_snxt + ISS_INCR/2) for the
+ * an ISS greater than (tcp_snxt + tcp_iss_incr/2) for the
* old connection.
*
* The next ISS generated is equal to tcp_iss_incr_extra
- * + ISS_INCR/2 + other components depending on the
+ * + tcp_iss_incr/2 + other components depending on the
* value of tcp_strong_iss. We pre-calculate the new
* ISS here and compare with tcp_snxt to determine if
* we need to make adjustment to tcp_iss_incr_extra.
*
* The above calculation is ugly and is a
@@ -555,16 +556,17 @@
/* Add time component and min random (i.e. 1). */
new_iss += (gethrtime() >> ISS_NSEC_SHT) + 1;
break;
default:
/* Add only time component. */
- new_iss += (uint32_t)gethrestime_sec() * ISS_INCR;
+ new_iss += (uint32_t)gethrestime_sec() *
+ tcps->tcps_iss_incr;
break;
}
if ((adj = (int32_t)(tcp->tcp_snxt - new_iss)) > 0) {
/*
- * New ISS not guaranteed to be ISS_INCR/2
+ * New ISS not guaranteed to be tcp_iss_incr/2
* ahead of the current tcp_snxt, so add the
* difference to tcp_iss_incr_extra.
*/
tcps->tcps_iss_incr_extra += adj;
}