Lines Matching refs:tmp

53 	sack_blk_t tmp[MAX_SACK_BLK - 1];  in tcp_sack_insert()  local
84 tmp[j].begin = head[i].begin; in tcp_sack_insert()
85 tmp[j].end = head[i].end; in tcp_sack_insert()
117 head[i+1].begin = tmp[i].begin; in tcp_sack_insert()
118 head[i+1].end = tmp[i].end; in tcp_sack_insert()
135 sack_blk_t tmp[MAX_SACK_BLK]; in tcp_sack_remove() local
158 tmp[j].begin = end; in tcp_sack_remove()
159 tmp[j].end = head[i].end; in tcp_sack_remove()
162 tmp[j].begin = head[i].begin; in tcp_sack_remove()
163 tmp[j].end = head[i].end; in tcp_sack_remove()
169 head[i].begin = tmp[i].begin; in tcp_sack_remove()
170 head[i].end = tmp[i].end; in tcp_sack_remove()
195 notsack_blk_t *prev, *tmp, *new; in tcp_notsack_insert() local
202 tmp = *head; in tcp_notsack_insert()
205 while ((tmp != NULL) && SEQ_LEQ(tmp->end, begin)) { in tcp_notsack_insert()
206 prev = tmp; in tcp_notsack_insert()
207 (tmp->sack_cnt)++; in tcp_notsack_insert()
208 tmp = tmp->next; in tcp_notsack_insert()
215 if (tmp == NULL) { in tcp_notsack_insert()
223 if (SEQ_LEQ(end, tmp->begin)) { in tcp_notsack_insert()
228 if (SEQ_LEQ(end, tmp->end)) { in tcp_notsack_insert()
233 if (end == tmp->end && SEQ_LEQ(begin, tmp->begin)) { in tcp_notsack_insert()
235 prev->next = tmp->next; in tcp_notsack_insert()
237 *head = tmp->next; in tcp_notsack_insert()
240 *sum -= tmp->end - tmp->begin; in tcp_notsack_insert()
241 kmem_cache_free(tcp_notsack_blk_cache, tmp); in tcp_notsack_insert()
245 if (SEQ_GEQ(begin, tmp->begin)) { in tcp_notsack_insert()
247 if (begin == tmp->begin) { in tcp_notsack_insert()
248 *sum -= end - tmp->begin; in tcp_notsack_insert()
249 tmp->begin = end; in tcp_notsack_insert()
250 } else if (end == tmp->end) { in tcp_notsack_insert()
251 *sum -= tmp->end - begin; in tcp_notsack_insert()
252 tmp->end = begin; in tcp_notsack_insert()
253 (tmp->sack_cnt)++; in tcp_notsack_insert()
261 new->end = tmp->end; in tcp_notsack_insert()
263 new->next = tmp->next; in tcp_notsack_insert()
265 tmp->end = begin; in tcp_notsack_insert()
266 tmp->next = new; in tcp_notsack_insert()
267 (tmp->sack_cnt)++; in tcp_notsack_insert()
272 *sum -= end - tmp->begin; in tcp_notsack_insert()
273 tmp->begin = end; in tcp_notsack_insert()
281 if (SEQ_LT(tmp->begin, begin)) { in tcp_notsack_insert()
282 tmp_sum -= tmp->end - begin; in tcp_notsack_insert()
283 tmp->end = begin; in tcp_notsack_insert()
284 (tmp->sack_cnt)++; in tcp_notsack_insert()
285 prev = tmp; in tcp_notsack_insert()
286 tmp = tmp->next; in tcp_notsack_insert()
289 while (tmp != NULL) { in tcp_notsack_insert()
291 if (SEQ_GT(tmp->begin, end)) { in tcp_notsack_insert()
295 if (SEQ_LEQ(tmp->end, end)) { in tcp_notsack_insert()
297 tmp_sum -= tmp->end - tmp->begin; in tcp_notsack_insert()
299 prev->next = tmp->next; in tcp_notsack_insert()
301 tmp); in tcp_notsack_insert()
302 tmp = prev->next; in tcp_notsack_insert()
304 *head = tmp->next; in tcp_notsack_insert()
306 tmp); in tcp_notsack_insert()
307 tmp = *head; in tcp_notsack_insert()
314 tmp_sum -= end - tmp->begin; in tcp_notsack_insert()
315 tmp->begin = end; in tcp_notsack_insert()
340 notsack_blk_t *prev, *tmp; in tcp_notsack_remove() local
347 tmp = *head; in tcp_notsack_remove()
348 while (tmp != NULL) { in tcp_notsack_remove()
350 if (SEQ_GT(tmp->begin, end)) { in tcp_notsack_remove()
355 if (SEQ_GEQ(end, tmp->end)) { in tcp_notsack_remove()
357 tmp_sum -= tmp->end - tmp->begin; in tcp_notsack_remove()
359 *head = tmp->next; in tcp_notsack_remove()
360 kmem_cache_free(tcp_notsack_blk_cache, tmp); in tcp_notsack_remove()
361 tmp = *head; in tcp_notsack_remove()
363 prev->next = tmp->next; in tcp_notsack_remove()
364 kmem_cache_free(tcp_notsack_blk_cache, tmp); in tcp_notsack_remove()
365 tmp = prev->next; in tcp_notsack_remove()
368 tmp_sum -= end - tmp->begin; in tcp_notsack_remove()
369 tmp->begin = end; in tcp_notsack_remove()
394 notsack_blk_t *tmp; in tcp_notsack_update() local
396 tmp = *head; in tcp_notsack_update()
398 if (tmp == NULL) { in tcp_notsack_update()
399 if ((tmp = kmem_cache_alloc(tcp_notsack_blk_cache, in tcp_notsack_update()
403 tmp->begin = begin; in tcp_notsack_update()
404 tmp->end = end; in tcp_notsack_update()
405 tmp->next = NULL; in tcp_notsack_update()
406 tmp->sack_cnt = 0; in tcp_notsack_update()
407 *head = tmp; in tcp_notsack_update()
418 while (tmp->next != NULL) { in tcp_notsack_update()
419 tmp = tmp->next; in tcp_notsack_update()
423 if (SEQ_GEQ(tmp->end, begin)) { in tcp_notsack_update()
424 *sum += end - tmp->end; in tcp_notsack_update()
425 tmp->end = end; in tcp_notsack_update()
428 tmp->next = kmem_cache_alloc(tcp_notsack_blk_cache, KM_NOSLEEP); in tcp_notsack_update()
429 if (tmp->next != NULL) { in tcp_notsack_update()
430 tmp = tmp->next; in tcp_notsack_update()
431 tmp->begin = begin; in tcp_notsack_update()
432 tmp->end = end; in tcp_notsack_update()
433 tmp->next = NULL; in tcp_notsack_update()
434 tmp->sack_cnt = 0; in tcp_notsack_update()