MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bbr_free

Function bbr_free

freebsd/netinet/tcp_stacks/bbr.c:3356–3383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3354}
3355
3356static void
3357bbr_free(struct tcp_bbr *bbr, struct bbr_sendmap *rsm)
3358{
3359 if (rsm->r_limit_type) {
3360 /* currently there is only one limit type */
3361 bbr->r_ctl.rc_num_split_allocs--;
3362 }
3363 if (rsm->r_is_smallmap)
3364 bbr->r_ctl.rc_num_small_maps_alloced--;
3365 if (bbr->r_ctl.rc_tlp_send == rsm)
3366 bbr->r_ctl.rc_tlp_send = NULL;
3367 if (bbr->r_ctl.rc_resend == rsm) {
3368 bbr->r_ctl.rc_resend = NULL;
3369 }
3370 if (bbr->r_ctl.rc_next == rsm)
3371 bbr->r_ctl.rc_next = NULL;
3372 if (bbr->r_ctl.rc_sacklast == rsm)
3373 bbr->r_ctl.rc_sacklast = NULL;
3374 if (bbr->r_ctl.rc_free_cnt < bbr_min_req_free) {
3375 memset(rsm, 0, sizeof(struct bbr_sendmap));
3376 TAILQ_INSERT_TAIL(&bbr->r_ctl.rc_free, rsm, r_next);
3377 rsm->r_limit_type = 0;
3378 bbr->r_ctl.rc_free_cnt++;
3379 return;
3380 }
3381 bbr->r_ctl.rc_num_maps_alloced--;
3382 uma_zfree(bbr_zone, rsm);
3383}
3384
3385/*
3386 * Returns the BDP.

Callers 3

bbr_merge_rsmFunction · 0.85
bbr_log_synFunction · 0.85
bbr_log_ackFunction · 0.85

Calls 2

memsetFunction · 0.85
uma_zfreeFunction · 0.50

Tested by

no test coverage detected