FreeBSD kernel IPv4 code
cc_newreno.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/socket.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/socketvar.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <net/vnet.h>
#include <net/route.h>
#include <net/route/nhop.h>
#include <netinet/in_pcb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/tcp_seq.h>
#include <netinet/tcp_var.h>
#include <netinet/tcp_log_buf.h>
#include <netinet/tcp_hpts.h>
#include <netinet/cc/cc.h>
#include <netinet/cc/cc_module.h>
#include <netinet/cc/cc_newreno.h>
Include dependency graph for cc_newreno.c:

Go to the source code of this file.

Macros

#define V_newreno_beta   VNET(newreno_beta)
 
#define V_newreno_beta_ecn   VNET(newreno_beta_ecn)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static void newreno_cb_destroy (struct cc_var *ccv)
 
static void newreno_ack_received (struct cc_var *ccv, uint16_t type)
 
static void newreno_after_idle (struct cc_var *ccv)
 
static void newreno_cong_signal (struct cc_var *ccv, uint32_t type)
 
static int newreno_ctl_output (struct cc_var *ccv, struct sockopt *sopt, void *buf)
 
static void newreno_newround (struct cc_var *ccv, uint32_t round_cnt)
 
static void newreno_rttsample (struct cc_var *ccv, uint32_t usec_rtt, uint32_t rxtcnt, uint32_t fas)
 
static int newreno_cb_init (struct cc_var *ccv, void *)
 
static size_t newreno_data_sz (void)
 
 VNET_DECLARE (uint32_t, newreno_beta)
 
 VNET_DEFINE (uint32_t, newreno_beta_ecn)
 
static void newreno_log_hystart_event (struct cc_var *ccv, struct newreno *nreno, uint8_t mod, uint32_t flex1)
 
static int newreno_beta_handler (SYSCTL_HANDLER_ARGS)
 
 SYSCTL_DECL (_net_inet_tcp_cc_newreno)
 
 SYSCTL_NODE (_net_inet_tcp_cc, OID_AUTO, newreno, CTLFLAG_RW|CTLFLAG_MPSAFE, NULL, "New Reno related settings")
 
 SYSCTL_PROC (_net_inet_tcp_cc_newreno, OID_AUTO, beta, CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_NEEDGIANT, &VNET_NAME(newreno_beta), 3, &newreno_beta_handler, "IU", "New Reno beta, specified as number between 1 and 100")
 
 SYSCTL_PROC (_net_inet_tcp_cc_newreno, OID_AUTO, beta_ecn, CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_NEEDGIANT, &VNET_NAME(newreno_beta_ecn), 3, &newreno_beta_handler, "IU", "New Reno beta ecn, specified as number between 1 and 100")
 
 DECLARE_CC_MODULE (newreno, &newreno_cc_algo)
 
 MODULE_VERSION (newreno, 2)
 

Variables

struct cc_algo newreno_cc_algo
 

Macro Definition Documentation

◆ V_newreno_beta

#define V_newreno_beta   VNET(newreno_beta)

Definition at line 101 of file cc_newreno.c.

◆ V_newreno_beta_ecn

#define V_newreno_beta_ecn   VNET(newreno_beta_ecn)

Definition at line 103 of file cc_newreno.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ DECLARE_CC_MODULE()

DECLARE_CC_MODULE ( newreno  ,
newreno_cc_algo 
)

◆ MODULE_VERSION()

MODULE_VERSION ( newreno  ,
 
)

◆ newreno_ack_received()

◆ newreno_after_idle()

static void newreno_after_idle ( struct cc_var ccv)
static

Definition at line 349 of file cc_newreno.c.

References cc_var::cc_data, CC_NEWRENO_HYSTART_ENABLED, CCV, newreno_cc_after_idle(), newreno::newreno_flags, and newreno_log_hystart_event().

Here is the call graph for this function:

◆ newreno_beta_handler()

static int newreno_beta_handler ( SYSCTL_HANDLER_ARGS  )
static

Definition at line 494 of file cc_newreno.c.

References V_cc_do_abe.

◆ newreno_cb_destroy()

static void newreno_cb_destroy ( struct cc_var ccv)
static

Definition at line 212 of file cc_newreno.c.

References cc_var::cc_data.

◆ newreno_cb_init()

◆ newreno_cong_signal()

◆ newreno_ctl_output()

◆ newreno_data_sz()

static size_t newreno_data_sz ( void  )
static

Definition at line 171 of file cc_newreno.c.

◆ newreno_log_hystart_event()

◆ newreno_newround()

◆ newreno_rttsample()

◆ SYSCTL_DECL()

SYSCTL_DECL ( _net_inet_tcp_cc_newreno  )

◆ SYSCTL_NODE()

SYSCTL_NODE ( _net_inet_tcp_cc  ,
OID_AUTO  ,
newreno  ,
CTLFLAG_RW|  CTLFLAG_MPSAFE,
NULL  ,
"New Reno related settings"   
)

◆ SYSCTL_PROC() [1/2]

SYSCTL_PROC ( _net_inet_tcp_cc_newreno  ,
OID_AUTO  ,
beta  ,
CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW|  CTLFLAG_NEEDGIANT,
VNET_NAMEnewreno_beta,
,
newreno_beta_handler,
"IU"  ,
"New Reno  beta,
specified as number between 1 and 100"   
)

◆ SYSCTL_PROC() [2/2]

SYSCTL_PROC ( _net_inet_tcp_cc_newreno  ,
OID_AUTO  ,
beta_ecn  ,
CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW|  CTLFLAG_NEEDGIANT,
VNET_NAMEnewreno_beta_ecn,
,
newreno_beta_handler,
"IU"  ,
"New Reno beta  ecn,
specified as number between 1 and 100"   
)

◆ VNET_DECLARE()

VNET_DECLARE ( uint32_t  ,
newreno_beta   
)

◆ VNET_DEFINE()

VNET_DEFINE ( uint32_t  ,
newreno_beta_ecn   
)

Variable Documentation

◆ newreno_cc_algo

struct cc_algo newreno_cc_algo
Initial value:
= {
.name = "newreno",
.cb_destroy = newreno_cb_destroy,
.ack_received = newreno_ack_received,
.after_idle = newreno_after_idle,
.cong_signal = newreno_cong_signal,
.post_recovery = newreno_cc_post_recovery,
.ctl_output = newreno_ctl_output,
.newround = newreno_newround,
.rttsample = newreno_rttsample,
.cb_init = newreno_cb_init,
.cc_data_sz = newreno_data_sz,
}
void newreno_cc_post_recovery(struct cc_var *ccv)
Definition: cc.c:384
static int newreno_cb_init(struct cc_var *ccv, void *)
Definition: cc_newreno.c:177
static void newreno_ack_received(struct cc_var *ccv, uint16_t type)
Definition: cc_newreno.c:218
static int newreno_ctl_output(struct cc_var *ccv, struct sockopt *sopt, void *buf)
Definition: cc_newreno.c:443
static void newreno_cb_destroy(struct cc_var *ccv)
Definition: cc_newreno.c:212
static size_t newreno_data_sz(void)
Definition: cc_newreno.c:171
static void newreno_rttsample(struct cc_var *ccv, uint32_t usec_rtt, uint32_t rxtcnt, uint32_t fas)
Definition: cc_newreno.c:555
static void newreno_newround(struct cc_var *ccv, uint32_t round_cnt)
Definition: cc_newreno.c:514
static void newreno_after_idle(struct cc_var *ccv)
Definition: cc_newreno.c:349
static void newreno_cong_signal(struct cc_var *ccv, uint32_t type)
Definition: cc_newreno.c:369

Definition at line 105 of file cc_newreno.c.

Referenced by newreno_ctl_output().