if (ctl && strlen(ctl) != 0) {
const char *fail_mode;
int max_backoff, probe;
+ int rate_limit, burst_limit;
if (!strcmp(ctl, "discover")) {
ofproto_set_discovery(br->ofproto, true,
}
ofproto_set_max_backoff(br->ofproto, max_backoff);
+ rate_limit = cfg_get_int(0, "%s.rate-limit", pfx);
+ if (!rate_limit) {
+ rate_limit = cfg_get_int(0, "mgmt.rate-limit");
+ }
+ burst_limit = cfg_get_int(0, "%s.burst-limit", pfx);
+ if (!burst_limit) {
+ burst_limit = cfg_get_int(0, "mgmt.burst-limit");
+ }
+ printf("rate_limit=%d burst_limit=%d\n", rate_limit, burst_limit);
+ ofproto_set_rate_limit(br->ofproto, rate_limit, burst_limit);
+
ofproto_set_stp(br->ofproto, cfg_get_bool(0, "%s.stp", pfx));
if (cfg_has("%s.commands.acl", pfx)) {
.de TQ
. br
. ns
-. TP \$1
+. TP "\\$1"
+..
+.de IQ
+. br
+. ns
+. IP "\\$1"
..
.de ST
. PP
. RS -0.15in
-. I \\$1
+. I "\\$1"
. RE
. PP
..
connection attempts starts at 1 second and doubles on each failing
attempt until it reaches the maximum. The default maximum backoff
time is taken from \fBmgmt.max-backoff\fR.
+.ST "Rate Limit Settings"
+These settings configure how the virtual switch applies a ``token
+bucket'' to limit the rate at which packets in unknown flows are
+forwarded to the OpenFlow controller for flow-setup processing. This
+feature prevents a single bridge from overwhelming a controller.
+.IP "\fBbridge.\fIname\fB.controller.rate-limit = \fIrate\fR"
+.IQ "\fBmgmt.rate-limit = \fIrate\fR"
+Limits the maximum rate at which packets will be forwarded to the
+OpenFlow controller to \fIrate\fR packets per second. The first of
+these that is set takes effect.
+.IP
+If neither one of these settings is set, then the bridge does not
+limit the rate at which packets are forwarded to the controller.
+.IP "\fBbridge.\fIname\fB.controller.burst-limit = \fIburst\fR"
+.IQ "\fBmgmt.burst-limit = \fIburst\fR"
+Sets the maximum number of unused packet credits that the bridge will
+allow to accumulate during time in which no packets are being
+forwarded to the OpenFlow controller to \fIburst\fR (measured in
+packets). The default \fIburst\fR is one-quarter of the \fIrate\fR
+specified in the rate limit setting.
+.IP
+The first of these that is set takes effect. This option takes effect
+only when a rate limit is specified.
.ST "Remote Command Execution Settings"
These settings configure the commands that remote OpenFlow connections
are allowed to invoke using (e.g.) \fBdpctl execute\fR. To be