* Mark the SACK_PASSED flag on all entries prior to rsm send wise. */
| 7011 | * Mark the SACK_PASSED flag on all entries prior to rsm send wise. |
| 7012 | */ |
| 7013 | static void |
| 7014 | bbr_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 |
no test coverage detected