X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fpinsched.c;h=d749ee4e6f912cd71f1d75873cc45e94626c7533;hb=a31e0e31c6f319b50e0d285117c5d187804a7b2e;hp=b9c6371add0bc9728ee5ce268465838be363ca51;hpb=a0bc29a541fc7dc6e20137d5558e2094d614e6ab;p=openvswitch diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c index b9c6371a..d749ee4e 100644 --- a/ofproto/pinsched.c +++ b/ofproto/pinsched.c @@ -70,7 +70,7 @@ dequeue_packet(struct pinsched *ps, struct ovs_queue *q, struct ofpbuf *packet = queue_pop_head(q); if (!q->n) { free(q); - port_array_set(&ps->queues, port_no, NULL); + port_array_delete(&ps->queues, port_no); } ps->n_queued--; return packet; @@ -267,6 +267,14 @@ pinsched_destroy(struct pinsched *ps) } } +void +pinsched_get_limits(const struct pinsched *ps, + int *rate_limit, int *burst_limit) +{ + *rate_limit = ps->rate_limit; + *burst_limit = ps->burst_limit; +} + void pinsched_set_limits(struct pinsched *ps, int rate_limit, int burst_limit) {