Lines Matching defs:hole
467 struct sackhole *hole;
475 hole = (struct sackhole *)uma_zalloc(V_sack_hole_zone, M_NOWAIT);
476 if (hole == NULL)
479 hole->start = start;
480 hole->end = end;
481 hole->rxmit = start;
486 return hole;
493 tcp_sackhole_free(struct tcpcb *tp, struct sackhole *hole)
496 uma_zfree(V_sack_hole_zone, hole);
506 * Insert new SACK hole into scoreboard.
512 struct sackhole *hole;
514 /* Allocate a new SACK hole. */
515 hole = tcp_sackhole_alloc(tp, start, end);
516 if (hole == NULL)
519 /* Insert the new SACK hole into scoreboard. */
521 TAILQ_INSERT_AFTER(&tp->snd_holes, after, hole, scblink);
523 TAILQ_INSERT_TAIL(&tp->snd_holes, hole, scblink);
527 tp->sackhint.nexthole = hole;
529 return hole;
533 * Remove SACK hole from scoreboard.
536 tcp_sackhole_remove(struct tcpcb *tp, struct sackhole *hole)
540 if (tp->sackhint.nexthole == hole)
541 tp->sackhint.nexthole = TAILQ_NEXT(hole, scblink);
543 /* Remove this SACK hole. */
544 TAILQ_REMOVE(&tp->snd_holes, hole, scblink);
546 /* Free this SACK hole. */
547 tcp_sackhole_free(tp, hole);
554 * Returns SACK_NEWLOSS if incoming ACK indicates ongoing loss (hole split, new hole),
675 * and move this hole left. With normal holes, snd_fack
687 ("sackhint hole bytes >= 0"));
693 * Append a new SACK hole at the tail. If the
696 * by way of hole splitting in the while-loop below.
708 * We failed to add a new hole based on the current
737 cur = TAILQ_LAST(&tp->snd_holes, sackhole_head); /* Last SACK hole. */
763 * SACKs data beyond the current hole. Go to the
771 * SACKs data before the current hole. Go to the
772 * previous hole.
789 /* Data acks at least the beginning of hole. */
791 /* Acks entire hole, so delete hole. */
799 * next hole too, so continue onto the next
800 * hole.
804 /* Move start of hole forward. */
811 /* Data acks at least the end of hole. */
813 /* Move end of hole backward. */
822 * ACKs some data in middle of a hole; need
823 * to split current hole
855 * we're done with the sack block or the sack hole.
986 * Add a hole between th_ack (snd_una is not yet set) and snd_max,
1006 * the hole for the rescue retransmission,
1007 * and also don't create a hole, if only
1027 * Returns the next hole to retransmit and the number of retransmitted bytes
1028 * from the scoreboard. We store both the next hole and the number of
1033 * the loop to traverse more than 1 link before finding the next hole to
1040 * that hole has been sacked, in which case, the hole would have been removed
1046 struct sackhole *hole = NULL;
1050 hole = tp->sackhint.nexthole;
1051 if (hole == NULL)
1052 return (hole);
1053 if (SEQ_GEQ(hole->rxmit, hole->end)) {
1055 hole = TAILQ_NEXT(hole, scblink);
1056 if (hole == NULL)
1057 return (hole);
1058 if (SEQ_LT(hole->rxmit, hole->end)) {
1059 tp->sackhint.nexthole = hole;
1064 KASSERT(SEQ_LT(hole->start, hole->end), ("%s: hole.start >= hole.end", __func__));
1066 KASSERT(SEQ_LT(hole->start, tp->snd_fack), ("%s: hole.start >= snd.fack", __func__));
1067 KASSERT(SEQ_LT(hole->end, tp->snd_fack), ("%s: hole.end >= snd.fack", __func__));
1068 KASSERT(SEQ_LT(hole->rxmit, tp->snd_fack), ("%s: hole.rxmit >= snd.fack", __func__));
1069 if (SEQ_GEQ(hole->start, hole->end) ||
1070 SEQ_GEQ(hole->start, tp->snd_fack) ||
1071 SEQ_GEQ(hole->end, tp->snd_fack) ||
1072 SEQ_GEQ(hole->rxmit, tp->snd_fack)) {
1073 log(LOG_CRIT,"tcp: invalid SACK hole (%u-%u,%u) vs fwd ack %u, ignoring.\n",
1074 hole->start, hole->end, hole->rxmit, tp->snd_fack);
1078 return (hole);
1106 * i) snd_nxt lies between end of one hole and beginning of another
1107 * ii) snd_nxt lies between end of last hole and snd_fack
1130 * Check is FACK is beyond the rexmit of the leftmost hole.
1146 * Start retransmissions from the first hole, and