Subject: Re: [PATCH] pkt_sched: gen_estimator: use 64 bits intermediate counters for bps

From: Jarek Poplawski <[email-masked]>
Date: Tue, 19 May 2009 07:02:52 +0000

On Tue, May 19, 2009 at 01:59:55AM +0200, Eric Dumazet wrote:
...
> diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
...
> -		e->avbps += ((long)rate - (long)e->avbps) >> e->ewma_log;
> +		e->avbps += ((s64)(brate - e->avbps)) >> e->ewma_log;

Btw., I'm a bit concerned about the syntax here: isn't such shifting
of signed ints implementation dependant?

Jarek P.