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

Function bbr_earlier_retran

freebsd/netinet/tcp_stacks/bbr.c:6437–6494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6435}
6436
6437static void
6438bbr_earlier_retran(struct tcpcb *tp, struct tcp_bbr *bbr, struct bbr_sendmap *rsm,
6439 uint32_t t, uint32_t cts, int ack_type)
6440{
6441 /*
6442 * For this RSM, we acknowledged the data from a previous
6443 * transmission, not the last one we made. This means we did a false
6444 * retransmit.
6445 */
6446 if (rsm->r_flags & BBR_HAS_FIN) {
6447 /*
6448 * The sending of the FIN often is multiple sent when we
6449 * have everything outstanding ack'd. We ignore this case
6450 * since its over now.
6451 */
6452 return;
6453 }
6454 if (rsm->r_flags & BBR_TLP) {
6455 /*
6456 * We expect TLP's to have this occur often
6457 */
6458 bbr->rc_tlp_rtx_out = 0;
6459 return;
6460 }
6461 if (ack_type != BBR_CUM_ACKED) {
6462 /*
6463 * If it was not a cum-ack we
6464 * don't really know for sure since
6465 * the timestamp could be from some
6466 * other transmission.
6467 */
6468 return;
6469 }
6470
6471 if (rsm->r_flags & BBR_WAS_SACKPASS) {
6472 /*
6473 * We retransmitted based on a sack and the earlier
6474 * retransmission ack'd it - re-ordering is occuring.
6475 */
6476 BBR_STAT_INC(bbr_reorder_seen);
6477 bbr->r_ctl.rc_reorder_ts = cts;
6478 }
6479 /* Back down the loss count */
6480 if (rsm->r_flags & BBR_MARKED_LOST) {
6481 bbr->r_ctl.rc_lost -= rsm->r_end - rsm->r_start;
6482 bbr->r_ctl.rc_lost_bytes -= rsm->r_end - rsm->r_start;
6483 rsm->r_flags &= ~BBR_MARKED_LOST;
6484 if (SEQ_GT(bbr->r_ctl.rc_lt_lost, bbr->r_ctl.rc_lost))
6485 /* LT sampling also needs adjustment */
6486 bbr->r_ctl.rc_lt_lost = bbr->r_ctl.rc_lost;
6487 }
6488 /***** RRS HERE ************************/
6489 /* Do we need to do this??? */
6490 /* bbr_reset_lt_bw_sampling(bbr, cts); */
6491 /***** RRS HERE ************************/
6492 BBR_STAT_INC(bbr_badfr);
6493 BBR_STAT_ADD(bbr_badfr_bytes, (rsm->r_end - rsm->r_start));
6494}

Callers 1

bbr_update_rttFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected