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

Function bbr_log_syn

freebsd/netinet/tcp_stacks/bbr.c:7349–7382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7347}
7348
7349static void
7350bbr_log_syn(struct tcpcb *tp, struct tcpopt *to)
7351{
7352 struct tcp_bbr *bbr;
7353 struct bbr_sendmap *rsm;
7354 uint32_t cts;
7355
7356 bbr = (struct tcp_bbr *)tp->t_fb_ptr;
7357 cts = bbr->r_ctl.rc_rcvtime;
7358 rsm = TAILQ_FIRST(&bbr->r_ctl.rc_map);
7359 if (rsm && (rsm->r_flags & BBR_HAS_SYN)) {
7360 if ((rsm->r_end - rsm->r_start) <= 1) {
7361 /* Log out the SYN completely */
7362 bbr->r_ctl.rc_holes_rxt -= rsm->r_rtr_bytes;
7363 rsm->r_rtr_bytes = 0;
7364 TAILQ_REMOVE(&bbr->r_ctl.rc_map, rsm, r_next);
7365 if (rsm->r_in_tmap) {
7366 TAILQ_REMOVE(&bbr->r_ctl.rc_tmap, rsm, r_tnext);
7367 rsm->r_in_tmap = 0;
7368 }
7369 if (bbr->r_ctl.rc_next == rsm) {
7370 /* scoot along the marker */
7371 bbr->r_ctl.rc_next = TAILQ_FIRST(&bbr->r_ctl.rc_map);
7372 }
7373 if (to != NULL)
7374 bbr_update_rtt(tp, bbr, rsm, to, cts, BBR_CUM_ACKED, 0);
7375 bbr_free(bbr, rsm);
7376 } else {
7377 /* There is more (Fast open)? strip out SYN. */
7378 rsm->r_flags &= ~BBR_HAS_SYN;
7379 rsm->r_start++;
7380 }
7381 }
7382}
7383
7384/*
7385 * Returns the number of bytes that were

Callers 3

bbr_do_syn_sentFunction · 0.85
bbr_do_syn_recvFunction · 0.85
bbr.cFile · 0.85

Calls 2

bbr_update_rttFunction · 0.85
bbr_freeFunction · 0.85

Tested by

no test coverage detected