[ovs-dev] [PATCH OVS 2/4] dpif-netdev: Add burst size to buckets
xiangxia.m.yue at gmail.com
xiangxia.m.yue at gmail.com
Thu Apr 30 11:00:37 UTC 2020
From: Tonghao Zhang <xiangxia.m.yue at gmail.com>
For now, the meter of the userspace datapath, don't include
the bucket burst size to buckets. This patch includes it now.
Cc: Ilya Maximets <i.maximets at ovn.org>
Cc: William Tu <u9012063 at gmail.com>
Cc: Jarno Rajahalme <jarno at ovn.org>
Cc: Ben Pfaff <blp at ovn.org>
Cc: Andy Zhou <azhou at ovn.org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
---
lib/dpif-netdev.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 17c0241aa2e2..59546db6a2a2 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -6092,15 +6092,10 @@ dpif_netdev_meter_set(struct dpif *dpif, ofproto_meter_id meter_id,
for (i = 0; i < config->n_bands; ++i) {
uint32_t band_max_delta_t;
- /* Set burst size to a workable value if none specified. */
- if (config->bands[i].burst_size == 0) {
- config->bands[i].burst_size = config->bands[i].rate;
- }
-
meter->bands[i].up = config->bands[i];
/* Convert burst size to the bucket units: */
/* pkts => 1/1000 packets, kilobits => bits. */
- meter->bands[i].up.burst_size *= 1000;
+ meter->bands[i].up.burst_size += config->bands[i].rate * 1000ULL;
/* Initialize bucket to empty. */
meter->bands[i].bucket = 0;
--
1.8.3.1
More information about the dev
mailing list