ofproto/pinsched.c
/* Creates and returns a scheduler for sending packet-in messages. */
Creates and returns a scheduler for sending packet-in messages.
Creates and returns a scheduler for sending packet - in messages .
struct pinsched *
pinsched_create(int rate_limit, int burst_limit)
{
    struct pinsched *ps;
    ps = xzalloc(sizeof *ps);
    adjust_limits(&rate_limit, &burst_limit);
    token_bucket_init(&ps->token_bucket,
                      rate_limit, sat_mul(burst_limit, 1000));
    hmap_init(&ps->queues);
    ps->n_queued = 0;
    ps->next_txq = NULL;
    ps->n_normal = 0;
    ps->n_limited = 0;
    ps->n_queue_dropped = 0;
    return ps;
}
struct pinsched * pinsched_create ( int rate_limit , int burst_limit ) { struct pinsched * ps ; ps = xzalloc ( sizeof * ps ) ; adjust_limits ( & rate_limit , & burst_limit ) ; token_bucket_init ( & ps -> token_bucket , rate_limit , sat_mul ( burst_limit , 1000 ) ) ; hmap_init ( & ps -> queues ) ; ps -> n_queued = 0 ; ps -> next_txq = NULL ; ps -> n_normal = 0 ; ps -> n_limited = 0 ; ps -> n_queue_dropped = 0 ; return ps ; }
Creates and returns a scheduler for sending packet-in messages.
Creates and returns a scheduler for sending packet - in messages .