projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
random: Get random seed from /dev/urandom.
[openvswitch]
/
ofproto
/
pinsched.c
diff --git
a/ofproto/pinsched.c
b/ofproto/pinsched.c
index bc7bd1100f9c9efbcfeb2352e22e00922aa6bbe6..d749ee4e6f912cd71f1d75873cc45e94626c7533 100644
(file)
--- 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);
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;
}
ps->n_queued--;
return packet;
@@
-230,7
+230,7
@@
pinsched_create(int rate_limit, int burst_limit, struct switch_status *ss)
{
struct pinsched *ps;
{
struct pinsched *ps;
- ps = x
calloc(1,
sizeof *ps);
+ ps = x
zalloc(
sizeof *ps);
port_array_init(&ps->queues);
ps->n_queued = 0;
ps->last_tx_port = PORT_ARRAY_SIZE;
port_array_init(&ps->queues);
ps->n_queued = 0;
ps->last_tx_port = PORT_ARRAY_SIZE;
@@
-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)
{
void
pinsched_set_limits(struct pinsched *ps, int rate_limit, int burst_limit)
{