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

Function bbr_log_sack_passed

freebsd/netinet/tcp_stacks/bbr.c:7013–7048  ·  view source on GitHub ↗

* Mark the SACK_PASSED flag on all entries prior to rsm send wise. */

Source from the content-addressed store, hash-verified

7011 * Mark the SACK_PASSED flag on all entries prior to rsm send wise.
7012 */
7013static void
7014bbr_log_sack_passed(struct tcpcb *tp,
7015 struct tcp_bbr *bbr, struct bbr_sendmap *rsm)
7016{
7017 struct bbr_sendmap *nrsm;
7018
7019 nrsm = rsm;
7020 TAILQ_FOREACH_REVERSE_FROM(nrsm, &bbr->r_ctl.rc_tmap,
7021 bbr_head, r_tnext) {
7022 if (nrsm == rsm) {
7023 /* Skip orginal segment he is acked */
7024 continue;
7025 }
7026 if (nrsm->r_flags & BBR_ACKED) {
7027 /* Skip ack'd segments */
7028 continue;
7029 }
7030 if (nrsm->r_flags & BBR_SACK_PASSED) {
7031 /*
7032 * We found one that is already marked
7033 * passed, we have been here before and
7034 * so all others below this are marked.
7035 */
7036 break;
7037 }
7038 BBR_STAT_INC(bbr_sack_passed);
7039 nrsm->r_flags |= BBR_SACK_PASSED;
7040 if (((nrsm->r_flags & BBR_MARKED_LOST) == 0) &&
7041 bbr_is_lost(bbr, nrsm, bbr->r_ctl.rc_rcvtime)) {
7042 bbr->r_ctl.rc_lost += nrsm->r_end - nrsm->r_start;
7043 bbr->r_ctl.rc_lost_bytes += nrsm->r_end - nrsm->r_start;
7044 nrsm->r_flags |= BBR_MARKED_LOST;
7045 }
7046 nrsm->r_flags &= ~BBR_WAS_SACKPASS;
7047 }
7048}
7049
7050/*
7051 * Returns the number of bytes that were

Callers 1

bbr_proc_sack_blkFunction · 0.85

Calls 1

bbr_is_lostFunction · 0.85

Tested by

no test coverage detected