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.
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);
}
}