summaryrefslogtreecommitdiff
path: root/lib/dpif-netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r--lib/dpif-netdev.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 2aad24511..02df8f11e 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -6095,7 +6095,6 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_,
struct dp_packet *packet;
long long int long_delta_t; /* msec */
uint32_t delta_t; /* msec */
- uint32_t delta_in_us; /* usec */
const size_t cnt = dp_packet_batch_size(packets_);
uint32_t bytes, volume;
int exceeded_band[NETDEV_MAX_BURST];
@@ -6126,9 +6125,6 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_,
Assuming that all racing threads received packets at the same time
to avoid overflow. */
long_delta_t = 0;
- delta_in_us = 0;
- } else {
- delta_in_us = (now - meter->used) % 1000;
}
/* Make sure delta_t will not be too large, so that bucket will not
@@ -6164,7 +6160,6 @@ dp_netdev_run_meter(struct dp_netdev *dp, struct dp_packet_batch *packets_,
/* Update band's bucket. */
band->bucket += delta_t * band->up.rate;
- band->bucket += delta_in_us * band->up.rate / 1000;
if (band->bucket > band->up.burst_size) {
band->bucket = band->up.burst_size;
}