summaryrefslogtreecommitdiff
path: root/net/openvswitch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-04-26 12:00:00 -0700
committerDavid S. Miller <davem@davemloft.net>2021-04-26 12:00:00 -0700
commit6876a18d3361e1893187970e1881a1d88d894d3f (patch)
treec79dfb4843b82d9346cae1dce68d9b1cfece1715 /net/openvswitch
parent0ea1041bfa3aa2971f858edd9e05477c2d3d54a0 (diff)
parentbbd6f0a948139970f4a615dff189d9a503681a39 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/meter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index 15424d26e85d..96b524ceabca 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -392,7 +392,7 @@ static struct dp_meter *dp_meter_create(struct nlattr **a)
*
* Start with a full bucket.
*/
- band->bucket = (band->burst_size + band->rate) * 1000ULL;
+ band->bucket = band->burst_size * 1000ULL;
band_max_delta_t = div_u64(band->bucket, band->rate);
if (band_max_delta_t > meter->max_delta_t)
meter->max_delta_t = band_max_delta_t;
@@ -641,7 +641,7 @@ bool ovs_meter_execute(struct datapath *dp, struct sk_buff *skb,
long long int max_bucket_size;
band = &meter->bands[i];
- max_bucket_size = (band->burst_size + band->rate) * 1000LL;
+ max_bucket_size = band->burst_size * 1000LL;
band->bucket += delta_ms * band->rate;
if (band->bucket > max_bucket_size)