FD.io VPP  v19.01.3-6-g70449b9b9
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_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)
 
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

◆ beta_cubic

#define beta_cubic   0.7

Definition at line 19 of file tcp_cubic.c.

◆ cubic_c

#define cubic_c   0.4

Definition at line 20 of file tcp_cubic.c.

◆ west_const

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

Definition at line 21 of file tcp_cubic.c.

Typedef Documentation

◆ cubic_cfg_t

typedef struct cubic_cfg_ cubic_cfg_t

◆ cubic_data_t

typedef struct cubic_data_ cubic_data_t

Function Documentation

◆ cubic_congestion()

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:

◆ cubic_conn_init()

static void cubic_conn_init ( tcp_connection_t tc)
static

Definition at line 188 of file tcp_cubic.c.

+ Here is the call graph for this function:

◆ cubic_cwnd_accumulate()

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

Definition at line 118 of file tcp_cubic.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cubic_init()

clib_error_t* cubic_init ( vlib_main_t vm)

Definition at line 227 of file tcp_cubic.c.

+ Here is the call graph for this function:

◆ cubic_rcv_ack()

static void cubic_rcv_ack ( tcp_connection_t tc)
static

Definition at line 133 of file tcp_cubic.c.

+ Here is the call graph for this function:

◆ cubic_recovered()

static void cubic_recovered ( tcp_connection_t tc)
static

Definition at line 109 of file tcp_cubic.c.

+ Here is the call graph for this function:

◆ cubic_time()

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:

◆ cubic_unformat_config()

static uword cubic_unformat_config ( unformat_input_t input)
static

Definition at line 199 of file tcp_cubic.c.

+ Here is the call graph for this function:

◆ K_cubic()

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()

STATIC_ASSERT ( sizeof(cubic_data_t)<=  TCP_CC_DATA_SZ,
"cubic data len  
)

◆ W_cubic()

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:

◆ W_est()

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

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

Definition at line 28 of file tcp_cubic.c.

◆ tcp_cubic

const tcp_cc_algorithm_t tcp_cubic
static
Initial value:
= {
.name = "cubic",
.unformat_cfg = cubic_unformat_config,
.congestion = cubic_congestion,
.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:199
static void cubic_recovered(tcp_connection_t *tc)
Definition: tcp_cubic.c:109
static void cubic_congestion(tcp_connection_t *tc)
Definition: tcp_cubic.c:95
static void cubic_rcv_ack(tcp_connection_t *tc)
Definition: tcp_cubic.c:133
void newreno_rcv_cong_ack(tcp_connection_t *tc, tcp_cc_ack_t ack_type)
Definition: tcp_newreno.c:45
static void cubic_conn_init(tcp_connection_t *tc)
Definition: tcp_cubic.c:188

Definition at line 216 of file tcp_cubic.c.