X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.h;h=5b235b65d74a0fb78e9ed9ae999e4595e21f4a84;hb=refs%2Fchanges%2F92%2F15892%2F7;hp=d4bebeb47b8a2850126c0b1844c93e73eea9dc7d;hpb=b688fb129746c040f5e6f880de592e53aff772d9;p=vpp.git 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;