From: Ben Pfaff Date: Tue, 12 Aug 2008 23:15:42 +0000 (-0700) Subject: Reduce default burst limit to rate limit / 4. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9b82cb59c027d9a32310c7645b6d4b8f2274bf5;hp=72984bb5e98c9f3aa38b023f6fa962c60a349bcc;p=openvswitch Reduce default burst limit to rate limit / 4. With the previous default burst limit of rate limit * 2, we would queue up 2 seconds worth of packet_in messages. This is not only much more than actually needed, it causes an actual problem: the datapath only retains buffered packets for up to 1 second, by default, so that flow setups sent in response have no packet to work with. --- diff --git a/secchan/secchan.c b/secchan/secchan.c index e54fb2ff..64a1f233 100644 --- a/secchan/secchan.c +++ b/secchan/secchan.c @@ -1219,13 +1219,10 @@ parse_options(int argc, char *argv[], struct settings *s) VLOG_WARN("Rate limit set to unusually low value %d", s->rate_limit); } - if (!s->burst_limit) { - s->burst_limit = s->rate_limit * 2; - } else if (s->burst_limit < s->rate_limit) { - VLOG_WARN("Burst limit (%d) set lower than rate limit (%d)", - s->burst_limit, s->rate_limit); + s->burst_limit = s->rate_limit / 4; } + s->burst_limit = MAX(s->burst_limit, 1); s->burst_limit = MIN(s->burst_limit, INT_MAX / 1000); } }