[ovs-dev] [PATCH RESEND ovs v3 4/4] dpif: Don't set "burst_size" to "rate" if not specified.

Ben Pfaff blp at ovn.org
Tue Mar 30 21:27:11 UTC 2021

On Tue, Mar 30, 2021 at 11:16:48PM +0200, Ilya Maximets wrote:
> On 3/3/21 3:46 PM, xiangxia.m.yue at gmail.com wrote:
> > From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
> > 
> > If user don't set the meter "burst_size", when creating them. OvS
> > will set "brust_size" to "rate", and there will be a double "rate"
> > as burst rate. For example:
> > 
> > $ ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps stats bands=type=drop rate=1000000'
> > 
> > The rate expected is 1Gbps, but burst rate is 2Gbps while
> > we don't use "burst_size".
> OpenFlow spec is a bit loose in definition of what should
> be behavior if burst is not set:
> """
> If the flag OFPMF_BURST is not set the burst_size values from meter
> bands are ignored, and if the meter implementation uses a burst value,
> this burst value must be set to an implementation defined optimal value.
> """
> In our case, historically, "implementation defined optimal value" was
> value equal to rate.  I have no idea why, but it's hard to argue with
> it since the spec gives a great freedom to choose.
> Actually, the "burst" itself as a term makes very little sense to me.
> It's defined by the spec as:
> """
> It defines the granularity of the meter band, for all packet or byte
> bursts whose length is greater than burst value, the meter rate will
> always be strictly enforced.
> """
> But what is the burst?  How the implementation should define which
> packets are in the burst and which are from the next one?
> Current implementation just assumes that bursts are measured per second.
> But the rate is measured per second too.  So, burst and rate is
> essentially the same thing and implementations just sums them together
> to get the bucket size.  So, I do not understand why "burst" and
> "burst_size" exist at all.  Why not just set the rate a bit higher?
> Ben, can you shed some light on this?  What was the original idea
> behind the meter burst?  Or maybe I'm missing something?

I wasn't really involved in the design of meters.  I saw them as a
feature of hardware switches that was not very relevant to software
switches.  I guess I was wrong.

I think that Jean Tourillhes was the primary architect of meters in
OpenFlow.  I am adding him to this thread.  I hope that he can help.

More information about the dev mailing list