projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vport: Better handle too-long network device names in vport_del().
[openvswitch]
/
ofproto
/
pinsched.c
diff --git
a/ofproto/pinsched.c
b/ofproto/pinsched.c
index 0afd22ff645958861172c51be308349deb6f6f07..6af2bb6765e2edcc18f46284f32fdfea3b01b17c 100644
(file)
--- a/
ofproto/pinsched.c
+++ b/
ofproto/pinsched.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009
, 2010
Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-16,7
+16,10
@@
#include <config.h>
#include "pinsched.h"
#include <config.h>
#include "pinsched.h"
+#include <sys/types.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
+#include <stdint.h>
#include <stdlib.h>
#include "ofpbuf.h"
#include "openflow/openflow.h"
#include <stdlib.h>
#include "ofpbuf.h"
#include "openflow/openflow.h"
@@
-227,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;
@@
-264,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)
{