FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
tcp_cubic.c File Reference
+ Include dependency graph for tcp_cubic.c:

Go to the source code of this file.

Data Structures

struct  cubic_cfg_
 
struct  cubic_data_
 

Macros

#define beta_cubic   0.7
 
#define cubic_c   0.4
 
#define west_const   (3 * (1 - beta_cubic) / (1 + beta_cubic))
 

Typedefs

typedef struct cubic_cfg_ cubic_cfg_t
 
typedef struct cubic_data_ cubic_data_t
 

Functions

 STATIC_ASSERT (sizeof(cubic_data_t)<=TCP_CC_DATA_SZ,"cubic data len")
 
static f64 cubic_time (u32 thread_index)
 
static u64 W_cubic (cubic_data_t *cd, f64 t)
 RFC 8312 Eq. More...
 
static f64 K_cubic (cubic_data_t *cd, u32 wnd)
 RFC 8312 Eq. More...
 
static u32 W_est (cubic_data_t *cd, f64 t, f64 rtt)
 RFC 8312 Eq. More...
 
static void cubic_congestion (tcp_connection_t *tc)
 
static void cubic_loss (tcp_connection_t *tc)
 
static void cubic_recovered (tcp_connection_t *tc)
 
static void cubic_cwnd_accumulate (tcp_connection_t *tc, u32 thresh, u32 bytes_acked)
 
static void cubic_rcv_ack (tcp_connection_t *tc, tcp_rate_sample_t *rs)
 
static void cubic_conn_init (tcp_connection_t *tc)
 
static uword cubic_unformat_config (unformat_input_t *input)
 
clib_error_tcubic_init (vlib_main_t *vm)
 

Variables

static cubic_cfg_t cubic_cfg
 
static const tcp_cc_algorithm_t tcp_cubic
 

Macro Definition Documentation

#define beta_cubic   0.7

Definition at line 19 of file tcp_cubic.c.

#define cubic_c   0.4

Definition at line 20 of file tcp_cubic.c.

#define west_const   (3 * (1 - beta_cubic) / (1 + beta_cubic))

Definition at line 21 of file tcp_cubic.c.

Typedef Documentation

typedef struct cubic_cfg_ cubic_cfg_t
typedef struct cubic_data_ cubic_data_t

Function Documentation

static void cubic_congestion ( tcp_connection_t tc)
static

Definition at line 95 of file tcp_cubic.c.

+ Here is the call graph for this function:

static void cubic_conn_init ( tcp_connection_t tc)
static

Definition at line 200 of file tcp_cubic.c.

+ Here is the call graph for this function:

static void cubic_cwnd_accumulate ( tcp_connection_t tc,
u32  thresh,
u32  bytes_acked 
)
static

Definition at line 130 of file tcp_cubic.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* cubic_init ( vlib_main_t vm)

Definition at line 240 of file tcp_cubic.c.

+ Here is the call graph for this function:

static void cubic_loss ( tcp_connection_t tc)
static

Definition at line 109 of file tcp_cubic.c.

+ Here is the call graph for this function:

static void cubic_rcv_ack ( tcp_connection_t tc,
tcp_rate_sample_t rs 
)
static

Definition at line 145 of file tcp_cubic.c.

+ Here is the call graph for this function:

static void cubic_recovered ( tcp_connection_t tc)
static

Definition at line 121 of file tcp_cubic.c.

+ Here is the call graph for this function:

static f64 cubic_time ( u32  thread_index)
inlinestatic

Definition at line 49 of file tcp_cubic.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword cubic_unformat_config ( unformat_input_t input)
static

Definition at line 211 of file tcp_cubic.c.

+ Here is the call graph for this function:

static f64 K_cubic ( cubic_data_t cd,
u32  wnd 
)
inlinestatic

RFC 8312 Eq.

2

Definition at line 72 of file tcp_cubic.c.

+ Here is the caller graph for this function:

STATIC_ASSERT ( sizeof(cubic_data_t)<=  TCP_CC_DATA_SZ,
"cubic data len  
)
static u64 W_cubic ( cubic_data_t cd,
f64  t 
)
inlinestatic

RFC 8312 Eq.

1

CUBIC window increase function. Time and K need to be provided in seconds.

Definition at line 60 of file tcp_cubic.c.

+ Here is the caller graph for this function:

static u32 W_est ( cubic_data_t cd,
f64  t,
f64  rtt 
)
inlinestatic

RFC 8312 Eq.

4

Estimates the window size of AIMD(alpha_aimd, beta_aimd) for alpha_aimd=3*(1-beta_cubic)/(1+beta_cubic) and beta_aimd=beta_cubic. Time (t) and rtt should be provided in seconds

Definition at line 88 of file tcp_cubic.c.

+ Here is the caller graph for this function:

Variable Documentation

cubic_cfg_t cubic_cfg
static
Initial value:
= {
.fast_convergence = 1,
}

Definition at line 28 of file tcp_cubic.c.

const tcp_cc_algorithm_t tcp_cubic
static
Initial value:
= {
.name = "cubic",
.unformat_cfg = cubic_unformat_config,
.congestion = cubic_congestion,
.loss = cubic_loss,
.recovered = cubic_recovered,
.rcv_ack = cubic_rcv_ack,
.rcv_cong_ack = newreno_rcv_cong_ack,
.init = cubic_conn_init,
}
static uword cubic_unformat_config(unformat_input_t *input)
Definition: tcp_cubic.c:211
static void cubic_recovered(tcp_connection_t *tc)
Definition: tcp_cubic.c:121
static void cubic_loss(tcp_connection_t *tc)
Definition: tcp_cubic.c:109
void newreno_rcv_cong_ack(tcp_connection_t *tc, tcp_cc_ack_t ack_type, tcp_rate_sample_t *rs)
Definition: tcp_newreno.c:52
static void cubic_congestion(tcp_connection_t *tc)
Definition: tcp_cubic.c:95
static void cubic_rcv_ack(tcp_connection_t *tc, tcp_rate_sample_t *rs)
Definition: tcp_cubic.c:145
static void cubic_conn_init(tcp_connection_t *tc)
Definition: tcp_cubic.c:200

Definition at line 228 of file tcp_cubic.c.