Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/cc/cc_dctcp.c
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | dctcp_after_idle(struct cc_var *ccv) | ||||
dctcp_data->num_cong_events = 0; | dctcp_data->num_cong_events = 0; | ||||
dctcp_cc_algo.after_idle = newreno_cc_algo.after_idle; | dctcp_cc_algo.after_idle = newreno_cc_algo.after_idle; | ||||
} | } | ||||
static void | static void | ||||
dctcp_cb_destroy(struct cc_var *ccv) | dctcp_cb_destroy(struct cc_var *ccv) | ||||
{ | { | ||||
if (ccv->cc_data != NULL) | |||||
free(ccv->cc_data, M_dctcp); | free(ccv->cc_data, M_dctcp); | ||||
ccv->cc_data = NULL; | |||||
} | } | ||||
static int | static int | ||||
dctcp_cb_init(struct cc_var *ccv) | dctcp_cb_init(struct cc_var *ccv) | ||||
{ | { | ||||
struct dctcp *dctcp_data; | struct dctcp *dctcp_data; | ||||
dctcp_data = malloc(sizeof(struct dctcp), M_dctcp, M_NOWAIT|M_ZERO); | dctcp_data = malloc(sizeof(struct dctcp), M_dctcp, M_NOWAIT|M_ZERO); | ||||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |