changeset 3430:40584439315b

6513446 ETSI TS 102 144 requires that SCTP delayed SACK frequency to be tunable
author kcpoon
date Wed, 17 Jan 2007 08:17:24 -0800
parents cce097545bd7
children 9f2d277dcffa
files usr/src/uts/common/inet/sctp/sctp_impl.h usr/src/uts/common/inet/sctp/sctp_input.c usr/src/uts/common/inet/sctp/sctp_param.c usr/src/uts/common/inet/sctp/sctp_timer.c
diffstat 4 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/inet/sctp/sctp_impl.h	Wed Jan 17 02:06:46 2007 -0800
+++ b/usr/src/uts/common/inet/sctp/sctp_impl.h	Wed Jan 17 08:17:24 2007 -0800
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -148,6 +148,7 @@
 #define	sctp_slow_start_after_idle	sctp_param_arr[34].sctp_param_val
 #define	sctp_prsctp_enabled		sctp_param_arr[35].sctp_param_val
 #define	sctp_fast_rxt_thresh		sctp_param_arr[36].sctp_param_val
+#define	sctp_deferred_acks_max		sctp_param_arr[37].sctp_param_val
 /*
  * sctp_wroff_xtra is the extra space in front of SCTP/IP header for link
  * layer header.  It has to be a multiple of 4.
--- a/usr/src/uts/common/inet/sctp/sctp_input.c	Wed Jan 17 02:06:46 2007 -0800
+++ b/usr/src/uts/common/inet/sctp/sctp_input.c	Wed Jan 17 08:17:24 2007 -0800
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -1621,19 +1621,21 @@
 	size_t slen;
 	sctp_chunk_hdr_t *sch;
 	sctp_sack_chunk_t *sc;
+	int32_t acks_max;
 
 	if (sctp->sctp_force_sack) {
 		sctp->sctp_force_sack = 0;
 		goto checks_done;
 	}
 
+	acks_max = sctp_deferred_acks_max;
 	if (sctp->sctp_state == SCTPS_ESTABLISHED) {
-		if (sctp->sctp_sack_toggle < 2) {
+		if (sctp->sctp_sack_toggle < acks_max) {
 			/* no need to SACK right now */
 			dprint(2, ("sctp_make_sack: %p no sack (toggle)\n",
 			    (void *)sctp));
 			return (NULL);
-		} else if (sctp->sctp_sack_toggle >= 2) {
+		} else if (sctp->sctp_sack_toggle >= acks_max) {
 			sctp->sctp_sack_toggle = 0;
 		}
 	}
--- a/usr/src/uts/common/inet/sctp/sctp_param.c	Wed Jan 17 02:06:46 2007 -0800
+++ b/usr/src/uts/common/inet/sctp/sctp_param.c	Wed Jan 17 08:17:24 2007 -0800
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -19,8 +18,9 @@
  *
  * CDDL HEADER END
  */
+
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -125,6 +125,7 @@
  { 1,		16384,		4,		"sctp_slow_start_after_idle"},
  { 0,		1,		1,		"sctp_prsctp_enabled"},
  { 1,		10000,		3,		"sctp_fast_rxt_thresh"},
+ { 1,		16,		2,		"sctp_deferred_acks_max"},
 };
 /* END CSTYLED */
 
--- a/usr/src/uts/common/inet/sctp/sctp_timer.c	Wed Jan 17 02:06:46 2007 -0800
+++ b/usr/src/uts/common/inet/sctp/sctp_timer.c	Wed Jan 17 08:17:24 2007 -0800
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -365,7 +365,7 @@
 sctp_ack_timer(sctp_t *sctp)
 {
 	sctp->sctp_ack_timer_running = 0;
-	sctp->sctp_sack_toggle = 2;
+	sctp->sctp_sack_toggle = sctp_deferred_acks_max;
 	BUMP_MIB(&sctp_mib, sctpOutAckDelayed);
 	sctp_sack(sctp, NULL);
 }