From aa01abb2b732abfb44559d25c9a11adfed57ac8b Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Mon, 12 Nov 2018 09:13:10 -0800 Subject: tcp: cubic fast convergence Change-Id: I3a15960fe346763faf13e8728ce36c2f3bf7b05a Signed-off-by: Florin Coras --- src/vnet/tcp/tcp.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/vnet/tcp/tcp.h') diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index d4bebeb47b8..5b235b65d74 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -30,7 +30,7 @@ #define TCP_PAWS_IDLE 24 * 24 * 60 * 60 * THZ /**< 24 days */ #define TCP_FIB_RECHECK_PERIOD 1 * THZ /**< Recheck every 1s */ #define TCP_MAX_OPTION_SPACE 40 -#define TCP_CC_DATA_SZ 20 +#define TCP_CC_DATA_SZ 24 #define TCP_DUPACK_THRESHOLD 3 #define TCP_MAX_RX_FIFO_SIZE 32 << 20 @@ -336,14 +336,18 @@ typedef struct _tcp_connection u32 tx_fifo_size; /**< Tx fifo size. Used to constrain cwnd */ } tcp_connection_t; +/* *INDENT-OFF* */ struct _tcp_cc_algorithm { + const char *name; + uword (*unformat_cfg) (unformat_input_t * input); void (*rcv_ack) (tcp_connection_t * tc); void (*rcv_cong_ack) (tcp_connection_t * tc, tcp_cc_ack_t ack); void (*congestion) (tcp_connection_t * tc); void (*recovered) (tcp_connection_t * tc); void (*init) (tcp_connection_t * tc); }; +/* *INDENT-ON* */ #define tcp_fastrecovery_on(tc) (tc)->flags |= TCP_CONN_FAST_RECOVERY #define tcp_fastrecovery_off(tc) (tc)->flags &= ~TCP_CONN_FAST_RECOVERY @@ -485,7 +489,9 @@ typedef struct _tcp_main /** fault-injection */ f64 buffer_fail_fraction; - u8 cc_algo; + /** Default congestion control algorithm type */ + tcp_cc_algorithm_type_e cc_algo; + } tcp_main_t; extern tcp_main_t tcp_main; -- cgit 1.2.3-korg