> - add support for new reno,
i apoligize for not mentioning that the new reno work
was part of the nix/9k tcp. i'm not sure who wrote it.
sorry!
also i forgot to mention that this version of qread can
potentially cut the number of reads on tcp channels by up
to 1/2. one might as well completely satisfy the read,
if possible. especially since typical iounits (8192) do not
divide up into typical mss-sized (1460) packets evenly.
[...]
/* if we get here, there's at least one block in the queue */
if(q->state & Qcoalesce){
/* when coalescing, 0 length blocks just go away */
b = q->bfirst;
if(BLEN(b) <= 0){
freeb(qremove(q));
goto again;
}
/*
* grab the first block and as many following
* blocks as will partially fit in the read
*/
n = 0;
l = &first;
for(;;) {
*l = qremove(q);
l = &b->next;
n += BLEN(b);
if(n >= len || (b = q->bfirst) == nil)
break;
}
- erik