meter: fix excess token bucket update in srtcm
authorNikhil Jagtap <nikhil.jagtap@gmail.com>
Wed, 21 Sep 2016 05:57:42 +0000 (00:57 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 21 Sep 2016 20:56:03 +0000 (22:56 +0200)
commita15b29ebe69a59de1dc03a55e1d002056781f7d3
tree8fefc9d9c1a6029f6d4a0117eeb82d8b04df4d03
parent8451269e6d7ba7501723fe2efd05745010295bac
meter: fix excess token bucket update in srtcm

As per srTCM RFC 2697, we should be updating the E bucket only after the
C bucket overflows. This patch fixes the current DPDK implementation,
where we are updating both the buckets simultaneously at the same rate
(CIR) which results in token accumulation rate of (2*CIR).

Signed-off-by: Nikhil Jagtap <nikhil.jagtap@gmail.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_meter/rte_meter.h