|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
20 #define beta_cubic 0.7
22 #define west_const (3 * (1 - beta_cubic) / (1 + beta_cubic))
32 .ssthresh = 0x7FFFFFFFU,
103 w_max = tc->cwnd / tc->snd_mss;
109 tc->cwnd = tc->ssthresh;
120 cd->
w_max = tc->cwnd / tc->snd_mss;
128 tc->cwnd = tc->ssthresh;
129 cd->
K =
K_cubic (cd, tc->cwnd / tc->snd_mss);
138 if (tc->cwnd_acc_bytes > thresh)
140 tc->cwnd += tc->snd_mss;
141 tc->cwnd_acc_bytes = 0;
156 if (tc->cwnd >= tc->tx_fifo_size)
161 tc->cwnd += tc->bytes_acked;
168 w_cubic =
W_cubic (cd, t + rtt_sec) * tc->snd_mss;
169 w_aimd = (
u64)
W_est (cd, t, rtt_sec) * tc->snd_mss;
170 if (w_cubic < w_aimd)
176 if (w_cubic > tc->cwnd)
188 thresh = (tc->snd_mss * tc->cwnd) / (w_cubic - tc->cwnd);
191 thresh =
clib_max (thresh, tc->snd_mss);
196 thresh = 50 * tc->cwnd;
216 u32 ssthresh = 0x7FFFFFFFU;
225 if (
unformat (input,
"no-fast-convergence"))
227 else if (
unformat (input,
"ssthresh %u", &ssthresh))
static f64 cubic_time(u32 thread_index)
f64 K
time period (in seconds) needed to increase the current window size to W_max if there are no further ...
static u32 tcp_initial_cwnd(const tcp_connection_t *tc)
Initial cwnd as per RFC5681.
static void cubic_cwnd_accumulate(tcp_connection_t *tc, u32 thresh, u32 bytes_acked)
struct _tcp_connection tcp_connection_t
STATIC_ASSERT(sizeof(cubic_data_t)<=TCP_CC_DATA_SZ, "cubic data len")
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static uword cubic_unformat_config(unformat_input_t *input)
static u32 tcp_loss_wnd(const tcp_connection_t *tc)
void newreno_rcv_cong_ack(tcp_connection_t *tc, tcp_cc_ack_t ack_type, tcp_rate_sample_t *rs)
static void cubic_rcv_ack(tcp_connection_t *tc, tcp_rate_sample_t *rs)
static f64 K_cubic(cubic_data_t *cd, u32 wnd)
RFC 8312 Eq.
f64 t_start
time (in sec) since the start of current congestion avoidance
static u32 W_est(cubic_data_t *cd, f64 t, f64 rtt)
RFC 8312 Eq.
struct cubic_cfg_ cubic_cfg_t
static cubic_cfg_t cubic_cfg
static void cubic_conn_init(tcp_connection_t *tc)
const static tcp_cc_algorithm_t tcp_cubic
clib_error_t * cubic_init(vlib_main_t *vm)
static f64 tcp_time_now_us(u32 thread_index)
static void cubic_loss(tcp_connection_t *tc)
static void * tcp_cc_data(tcp_connection_t *tc)
struct cubic_data_ cubic_data_t
static u64 W_cubic(cubic_data_t *cd, f64 t)
RFC 8312 Eq.
void tcp_cc_algo_register(tcp_cc_algorithm_type_e type, const tcp_cc_algorithm_t *vft)
Register exiting cc algo type.
#define tcp_in_slowstart(tc)
#define VLIB_INIT_FUNCTION(x)
static void tcp_cwnd_accumulate(tcp_connection_t *tc, u32 thresh, u32 bytes)
u32 w_max
Inflection point of the cubic function (in snd_mss segments)
struct _tcp_cc_algorithm tcp_cc_algorithm_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
static void cubic_recovered(tcp_connection_t *tc)
static void cubic_congestion(tcp_connection_t *tc)
#define TCP_TICK
TCP tick period (s)