Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27573
b: refs/heads/master
c: b3a92ea
h: refs/heads/master
i:
  27571: 3da5017
v: v3
  • Loading branch information
Luca De Cicco authored and David S. Miller committed Jun 18, 2006
1 parent d3c7ac1 commit 7d8cb3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b7d7a9e3c900f0733bf2aabdd41e6dbc70eae94b
refs/heads/master: b3a92eabe5b67bd207a38ae13dd51f4e08c1f6f7
12 changes: 9 additions & 3 deletions trunk/net/ipv4/tcp_westwood.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,16 @@ static inline u32 westwood_do_filter(u32 a, u32 b)
return (((7 * a) + b) >> 3);
}

static inline void westwood_filter(struct westwood *w, u32 delta)
static void westwood_filter(struct westwood *w, u32 delta)
{
w->bw_ns_est = westwood_do_filter(w->bw_ns_est, w->bk / delta);
w->bw_est = westwood_do_filter(w->bw_est, w->bw_ns_est);
/* If the filter is empty fill it with the first sample of bandwidth */
if (w->bw_ns_est == 0 && w->bw_est == 0) {
w->bw_ns_est = w->bk / delta;
w->bw_est = w->bw_ns_est;
} else {
w->bw_ns_est = westwood_do_filter(w->bw_ns_est, w->bk / delta);
w->bw_est = westwood_do_filter(w->bw_est, w->bw_ns_est);
}
}

/*
Expand Down

0 comments on commit 7d8cb3a

Please sign in to comment.