summaryrefslogtreecommitdiff
path: root/ofproto/pinsched.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-04-20 10:05:57 -0700
committerBen Pfaff <blp@nicira.com>2010-04-20 11:01:44 -0700
commit79c9f2ee7883b52860c76c3730725f5731402874 (patch)
tree3e67694ef36566e35e66efbaf92e393afcc9065c /ofproto/pinsched.c
parent0ade584ebe8ca1a1de92fb7422566726f276918c (diff)
downloadopenvswitch-79c9f2ee7883b52860c76c3730725f5731402874.tar.gz
ofproto: Bundle all controller-related settings into a struct.
Many ofproto settings are controller-related. Upcoming commits will add to ofproto the ability to support multiple controllers, so it is important to be able to refer to controller settings as a group. Hence, this commit bundles them into a new "struct ofproto_controller".
Diffstat (limited to 'ofproto/pinsched.c')
-rw-r--r--ofproto/pinsched.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ofproto/pinsched.c b/ofproto/pinsched.c
index b9c6371ad..6af2bb676 100644
--- a/ofproto/pinsched.c
+++ b/ofproto/pinsched.c
@@ -268,6 +268,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)
{
if (rate_limit <= 0) {