summaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp.h
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-02-13 12:38:52 +0100
committerFlorin Coras <florin.coras@gmail.com>2018-02-15 07:31:01 +0000
commita38783e0d1ab1d4c661570a1ec90670a1fb0598d (patch)
tree0506e7820911191e9e80ceb0dd6172b3e7a888c8 /src/vnet/sctp/sctp.h
parent4941fcc23ab01f5ca918e56489d404b92d8bde90 (diff)
SCTP: refactoring
This patch takes care of some refactoring, including the initialization of the timestamp to calculate the RTO, the output state-machine validation which can be enabled (disabled by default) when debugging and some clean-up of unused fields. It also addresses the requirement of Karn's algorithm when computing the RTO. Change-Id: I6b875152369bff23cad085708cec1f7e1151cfa8 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp.h')
-rw-r--r--src/vnet/sctp/sctp.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/vnet/sctp/sctp.h b/src/vnet/sctp/sctp.h
index 60a195f47c1..bc974d948de 100644
--- a/src/vnet/sctp/sctp.h
+++ b/src/vnet/sctp/sctp.h
@@ -128,6 +128,8 @@ typedef struct _sctp_sub_connection
u8 unacknowledged_hb; /**< Used to track how many unacknowledged heartbeats we had;
If more than Max.Retransmit then connetion is considered unreachable. */
+ u8 is_retransmitting; /**< A flag (0 = no, 1 = yes) indicating whether the connection is retransmitting a previous packet */
+
} sctp_sub_connection_t;
typedef struct
@@ -284,20 +286,6 @@ void sctp_prepare_heartbeat_ack_chunk (sctp_connection_t * sctp_conn,
u16 sctp_check_outstanding_data_chunks (sctp_connection_t * tc);
-#define SCTP_TICK 0.001 /**< SCTP tick period (s) */
-#define STHZ (u32) (1/SCTP_TICK) /**< SCTP tick frequency */
-#define SCTP_TSTAMP_RESOLUTION SCTP_TICK /**< Time stamp resolution */
-#define SCTP_PAWS_IDLE 24 * 24 * 60 * 60 * THZ /**< 24 days */
-#define SCTP_FIB_RECHECK_PERIOD 1 * THZ /**< Recheck every 1s */
-#define SCTP_MAX_OPTION_SPACE 40
-
-#define SCTP_DUPACK_THRESHOLD 3
-#define SCTP_MAX_RX_FIFO_SIZE 4 << 20
-#define SCTP_MIN_RX_FIFO_SIZE 4 << 10
-#define SCTP_IW_N_SEGMENTS 10
-#define SCTP_ALWAYS_ACK 1 /**< On/off delayed acks */
-#define SCTP_USE_SACKS 1 /**< Disable only for testing */
-
#define IP_PROTOCOL_SCTP 132
/** SSCTP FSM state definitions as per RFC4960. */
@@ -408,6 +396,7 @@ sctp_optparam_type_to_string (u8 type)
#define SCTP_TICK 0.001 /**< SCTP tick period (s) */
#define SHZ (u32) (1/SCTP_TICK) /**< SCTP tick frequency */
+#define SCTP_TSTAMP_RESOLUTION SCTP_TICK /**< Time stamp resolution */
/* As per RFC4960, page 83 */
#define SCTP_RTO_INIT 3 * SHZ /* 3 seconds */