diff options
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r-- | src/vnet/tcp/tcp.h | 10 |
1 files changed, 8 insertions, 2 deletions
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; |