Lines Matching defs:hole

237 	struct sackhole *hole;
245 hole = (struct sackhole *)zalloc_noblock(sack_hole_zone);
246 if (hole == NULL)
249 hole->start = start;
250 hole->end = end;
251 hole->rxmit = start;
256 return hole;
263 tcp_sackhole_free(struct tcpcb *tp, struct sackhole *hole)
265 zfree(sack_hole_zone, hole);
272 * Insert new SACK hole into scoreboard.
278 struct sackhole *hole;
280 /* Allocate a new SACK hole. */
281 hole = tcp_sackhole_alloc(tp, start, end);
282 if (hole == NULL)
285 /* Insert the new SACK hole into scoreboard */
287 TAILQ_INSERT_AFTER(&tp->snd_holes, after, hole, scblink);
289 TAILQ_INSERT_TAIL(&tp->snd_holes, hole, scblink);
293 tp->sackhint.nexthole = hole;
295 return hole;
299 * Remove SACK hole from scoreboard.
302 tcp_sackhole_remove(struct tcpcb *tp, struct sackhole *hole)
305 if (tp->sackhint.nexthole == hole)
306 tp->sackhint.nexthole = TAILQ_NEXT(hole, scblink);
308 /* Remove this SACK hole. */
309 TAILQ_REMOVE(&tp->snd_holes, hole, scblink);
311 /* Free this SACK hole. */
312 tcp_sackhole_free(tp, hole);
398 * Append new SACK hole at the tail.
401 * way of hole splitting in the while-loop below.
410 * We failed to add a new hole based on the current
427 /* We must have at least one SACK hole in scoreboard */
428 cur = TAILQ_LAST(&tp->snd_holes, sackhole_head); /* Last SACK hole */
436 * SACKs data beyond the current hole.
444 * SACKs data before the current hole.
445 * Go to the previous hole.
452 /* Data acks at least the beginning of hole */
454 /* Acks entire hole, so delete hole */
460 * hole too, so continue onto the next hole.
464 /* Move start of hole forward */
469 /* Data acks at least the end of hole */
471 /* Move end of hole backward */
476 * ACKs some data in middle of a hole; need to
477 * split current hole
497 * we're done with the sack block or the sack hole.
566 if (SEQ_LT(p->rxmit, tp->snd_una)) {/* old SACK hole */
578 * Returns the next hole to retransmit and the number of retransmitted bytes
579 * from the scoreboard. We store both the next hole and the number of
584 * For the loop to traverse more than 1 link before finding the next hole to
590 * But that can't happen, (start == end) means that all the data in that hole
591 * has been sacked, in which case, the hole would have been removed from the
597 struct sackhole *hole = NULL, *dbg_hole = NULL;
602 hole = tp->sackhint.nexthole;
603 if (hole == NULL || SEQ_LT(hole->rxmit, hole->end))
605 while ((hole = TAILQ_NEXT(hole, scblink)) != NULL) {
606 if (SEQ_LT(hole->rxmit, hole->end)) {
607 tp->sackhint.nexthole = hole;
612 if (dbg_hole != hole) {
613 printf("%s: Computed sack hole not the same as cached value\n", __func__);
614 hole = dbg_hole;
622 return (hole);
641 * i) snd_nxt lies between end of one hole and beginning of another
642 * ii) snd_nxt lies between end of last hole and snd_fack