On Mon, Oct 28, 2013 at 10:58:32AM +0800, annie li wrote:
[...]
quoted
quoted
if (timer_pending(&vif->credit_timeout))
return true;
/* Passed the point where we can replenish credit? */
- if (time_after_eq(now, next_credit)) {
- vif->credit_timeout.expires = now;
+ if (time_after_eq64(now, next_credit)) {
+ vif->credit_timeout.expires = (unsigned long)now;
updates credit_window_start as following,
vif->credit_window_start = (unsigned long)now;
both credit_window_start and credit_timeout.expires need to be
updated here,
vif->credit_window_start = (unsigned long)now;
vif->credit_timeout.expires = (unsigned long)now;
IMHO we don't need to update .expires anymore -- we now track the window
with another variable.
Wei.