• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/netinet/

Lines Matching refs:pipe

145 static void transmit_event(struct dn_pipe *pipe);
456 transmit_event(struct dn_pipe *pipe)
463 while ( (m = pipe->head) ) {
471 pipe->head = m->m_nextpkt ;
506 printf("dummynet: dropping bridged packet trapped in pipe\n");
520 if ( (m = pipe->head) ) {
523 * whole pipe p and hoping in the future we are more successful
525 heap_insert(&extract_heap, pkt->output_time, pipe);
532 * either a pipe (WF2Q) or a flow_queue (per-flow queueing)
580 struct dn_pipe *p = q->fs->pipe ;
586 printf("dummynet: ready_event- pipe is gone\n");
592 * schedule fixed-rate queues linked to this pipe:
657 DPRINTF(("dummynet: pipe %d ready from %s --\n",
797 struct dn_pipe *pipe = p;
798 if (pipe->if_name[0] != '\0')
799 printf("dummynet: bad ready_event_wfq for pipe %s\n",
800 pipe->if_name);
1139 * dummynet hook for packets. Below 'pipe' is a pipe or a queue
1142 * pipe_nr pipe or queue the packet is destined for.
1160 struct dn_pipe *pipe ;
1193 goto dropit ; /* this queue/pipe does not exist! */
1194 pipe = fs->pipe ;
1195 if (pipe == NULL) { /* must be a queue, try find a matching pipe */
1196 for (pipe = all_pipes; pipe && pipe->pipe_nr != fs->parent_nr;
1197 pipe = pipe->next)
1199 if (pipe != NULL)
1200 fs->pipe = pipe ;
1202 printf("dummynet: no pipe %d for queue %d, drop pkt\n",
1281 if (pipe->bandwidth)
1282 t = SET_TICKS(m, q, pipe);
1291 * set S to the virtual time V for the controlling pipe, and update
1292 * the sum of weights for the pipe; otherwise, remove flow from
1295 * Third, if pipe was idle, update V=max(S, V).
1299 q->S = pipe->V ;
1300 pipe->sum += fs->weight ; /* add weight of new queue */
1302 heap_extract(&(pipe->idle_heap), q);
1303 q->S = MAX64(q->F, pipe->V ) ;
1307 if (pipe->not_eligible_heap.elements == 0 &&
1308 pipe->scheduler_heap.elements == 0)
1309 pipe->V = MAX64 ( q->S, pipe->V );
1314 * scheduled for the same pipe, so the scheduler_heap cannot be
1324 if (DN_KEY_GT(q->S, pipe->V) ) { /* not eligible */
1325 if (pipe->scheduler_heap.elements == 0)
1327 heap_insert(&(pipe->not_eligible_heap), q->S, q);
1329 heap_insert(&(pipe->scheduler_heap), q->F, q);
1330 if (pipe->numbytes >= 0) { /* pipe is idle */
1331 if (pipe->scheduler_heap.elements != 1)
1332 printf("dummynet: OUCH! pipe should have been idle!\n");
1333 DPRINTF(("dummynet: waking up pipe %d at %d\n",
1334 pipe->pipe_nr, (int)(q->F >> MY_M)));
1335 pipe->sched_time = curr_time ;
1336 ready_event_wfq(pipe);
1412 /* if this fs is not part of a pipe, free it */
1413 if (fs->pipe && fs != &(fs->pipe->fs) )
1419 * Dispose all packets queued on a pipe (not a flow_set).
1420 * Also free all resources associated to a pipe, which is about
1424 purge_pipe(struct dn_pipe *pipe)
1428 purge_flow_set( &(pipe->fs), 1 );
1430 mnext = pipe->head;
1436 heap_free( &(pipe->scheduler_heap) );
1437 heap_free( &(pipe->not_eligible_heap) );
1438 heap_free( &(pipe->idle_heap) );
1634 * setup pipe or queue parameters.
1651 /* We need either a pipe number or a flow_set number */
1656 if (p->pipe_nr != 0) { /* this is a pipe */
1660 /* locate pipe */
1664 if (b == NULL || b->pipe_nr != p->pipe_nr) { /* new pipe */
1668 printf("dummynet: no memory for new pipe\n");
1672 x->fs.pipe = x ;
1693 if ( x->fs.rq == NULL ) { /* a new pipe */
1716 if (pfs->parent_nr == 0) { /* need link to a pipe */
1734 /* Change parent pipe not allowed; must delete and recreate */
1781 * helper function to remove a pipe from a heap (can be there at most once)
1814 /* remove all references to this pipe from flow_sets */
1831 * Fully delete a pipe or a queue, cleaning up associated info.
1840 if (p->pipe_nr != 0) { /* this is an old-style pipe */
1845 /* locate pipe */
1858 /* remove references to this pipe from the ip_fw rules. */
1861 /* remove all references to this pipe from flow_sets */
1863 if (fs->pipe == b) {
1864 printf("dummynet: ++ ref to pipe %d from fs %d\n",
1866 fs->pipe = NULL ;
1870 purge_pipe(b); /* remove all data associated to this pipe */
1896 if (b->pipe != NULL) {
1897 /* Update total weight on parent pipe and cleanup parent heaps */
1898 b->pipe->sum -= b->weight * b->backlogged ;
1899 fs_remove_from_heap(&(b->pipe->not_eligible_heap), b);
1900 fs_remove_from_heap(&(b->pipe->scheduler_heap), b);
1902 fs_remove_from_heap(&(b->pipe->idle_heap), b);
1997 * copy pipe descriptor into *bp, convert delay back to ms,
2013 pipe_bp->fs.pipe = NULL ;
2024 fs_bp->pipe = NULL ;
2070 case IP_DUMMYNET_DEL : /* remove a pipe or queue */