aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/gen_estimator.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/gen_estimator.c')
-rw-r--r--net/core/gen_estimator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index 0385dece1f6f..7c1ffd6f9501 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -83,10 +83,10 @@ static void est_timer(unsigned long arg)
83 u64 rate, brate; 83 u64 rate, brate;
84 84
85 est_fetch_counters(est, &b); 85 est_fetch_counters(est, &b);
86 brate = (b.bytes - est->last_bytes) << (8 - est->ewma_log); 86 brate = (b.bytes - est->last_bytes) << (10 - est->ewma_log - est->intvl_log);
87 brate -= (est->avbps >> est->ewma_log); 87 brate -= (est->avbps >> est->ewma_log);
88 88
89 rate = (u64)(b.packets - est->last_packets) << (8 - est->ewma_log); 89 rate = (u64)(b.packets - est->last_packets) << (10 - est->ewma_log - est->intvl_log);
90 rate -= (est->avpps >> est->ewma_log); 90 rate -= (est->avpps >> est->ewma_log);
91 91
92 write_seqcount_begin(&est->seq); 92 write_seqcount_begin(&est->seq);