On Mon, Aug 02, 2021 at 03:41:25PM +0200, Ilya Maximets wrote:
> > I know  that in latest ovs versions, both kernel datapath and dpdk 
> > userspace datapath supports meter action.
> > what I want to know is why we need to clear stats when modify meter bands? 
> > are there any considerations?

        When you modify bands, you may not have the same number of
bands before and after.
        When you modify the bandwidth, you would expect that to
completely change the statistics of the band (if you double the
bandwidth, you expect twice the number of packets), so it does not
really make sense to continue.
        At this point, we did not want to have a long and complex "if
you do this, and this. but not this, and not this, then...". Somebody
has to code and test those things.

> > I think it is easily to keep meter stats when only modify meter bands.
> 
> Hi.  I looked at the OFPMC_MODIFY definition in the OpenFlow specification
> and I see the following for the OpenFlow 1.3 and 1.4:
> 
> "For modify requests (OFPMC_MODIFY), if a meter entry with the specified
> meter identifier already exists, then that entry, including its bands, must
> be removed, and the new meter entry added."
> 
> I think, this matches with the current implementation.  So, the meter is
> completely removed and the new one added, hence no statistics is preserved.
> 
> What you're looking for seems to be defined in the OpenFlow 1.5:
> 
> "For modify requests (OFPMC_MODIFY), if a meter entry with the specified
> meter identifier already exists, then the configuration of that meter entry,
> including its flags and bands, must be removed (cleared), and the meter entry
> must use the new configuration included in the request. For that entry, meter
> top-level statistics are preserved (continued), meter band statistics are
> reset (cleared)."
> 
> So, for OpenFlow 1.5 the top-level statistics should be preserved.
> However, I don't think that OVS currently implements that.  It looks like
> OVS always implements meters as OF13 meters, which is a bug(?).  In order to
> support OF15 behavior we'll need to correctly implement it on all levels
> starting form the distinguishing the OF version of the particular OFPMC_MODIFY
> message and instruct the datapath to behave differently based on that.
> The behavior for OF 1.3 and 1.4 should stay as it is now.
> 
> Maybe Ben or Jean can correct me if my understanding is not correct here.

        Maybe I was entirely too cute when I did specify that. So far,
nobody complained, we are not looking at the most popular feature, so
my answer would be "why bother". Yes, I know, some people are
"completists"...

> Best regards, Ilya Maximets.

        Have fun...

        Jean
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to