From c9b82cb59c027d9a32310c7645b6d4b8f2274bf5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 12 Aug 2008 16:15:42 -0700 Subject: [PATCH] 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. --- secchan/secchan.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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); } } -- 2.30.2