Catalli's threaded switch
[sliver-openvswitch.git] / ofproto / pinsched.c
index b9c6371..d749ee4 100644 (file)
@@ -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)
 {