FD.io VPP  v21.06-3-gbb25fbf28
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
 
const static tcp_cc_algorithm_t tcp_cubic
 

Macro Definition Documentation

◆ beta_cubic

#define beta_cubic   0.7

Definition at line 20 of file tcp_cubic.c.

◆ cubic_c

#define cubic_c   0.4

Definition at line 21 of file tcp_cubic.c.

◆ west_const

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

Definition at line 22 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 98 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 203 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 133 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 247 of file tcp_cubic.c.

+ Here is the call graph for this function:

◆ cubic_loss()

static void cubic_loss ( tcp_connection_t tc)
static

Definition at line 113 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,
tcp_rate_sample_t rs 
)
static

Definition at line 148 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 124 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 52 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 214 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 75 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 63 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 91 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,
.ssthresh = 0x7FFFFFFFU,
}

Definition at line 30 of file tcp_cubic.c.

◆ tcp_cubic

const static 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,
}

Definition at line 235 of file tcp_cubic.c.

cubic_unformat_config
static uword cubic_unformat_config(unformat_input_t *input)
Definition: tcp_cubic.c:214
newreno_rcv_cong_ack
void newreno_rcv_cong_ack(tcp_connection_t *tc, tcp_cc_ack_t ack_type, tcp_rate_sample_t *rs)
Definition: tcp_newreno.c:62
cubic_rcv_ack
static void cubic_rcv_ack(tcp_connection_t *tc, tcp_rate_sample_t *rs)
Definition: tcp_cubic.c:148
cubic_conn_init
static void cubic_conn_init(tcp_connection_t *tc)
Definition: tcp_cubic.c:203
cubic_loss
static void cubic_loss(tcp_connection_t *tc)
Definition: tcp_cubic.c:113
cubic_recovered
static void cubic_recovered(tcp_connection_t *tc)
Definition: tcp_cubic.c:124
cubic_congestion
static void cubic_congestion(tcp_connection_t *tc)
Definition: tcp_cubic.c:98