Commit 2e4a83ab authored by Stephen Hemminger's avatar Stephen Hemminger

[TCP]: Kill westwood bw_sample, set but never used.

parent 43a37a79
...@@ -377,7 +377,6 @@ struct tcp_opt { ...@@ -377,7 +377,6 @@ struct tcp_opt {
/* TCP Westwood structure */ /* TCP Westwood structure */
struct { struct {
__u32 bw_sample; /* bandwidth sample */
__u32 bw_ns_est; /* first bandwidth estimation..not too smoothed 8) */ __u32 bw_ns_est; /* first bandwidth estimation..not too smoothed 8) */
__u32 bw_est; /* bandwidth estimate */ __u32 bw_est; /* bandwidth estimate */
__u32 rtt_win_sx; /* here starts a new evaluation... */ __u32 rtt_win_sx; /* here starts a new evaluation... */
......
...@@ -2065,7 +2065,6 @@ static void init_westwood(struct sock *sk) ...@@ -2065,7 +2065,6 @@ static void init_westwood(struct sock *sk)
{ {
struct tcp_opt *tp = tcp_sk(sk); struct tcp_opt *tp = tcp_sk(sk);
tp->westwood.bw_sample = 0;
tp->westwood.bw_ns_est = 0; tp->westwood.bw_ns_est = 0;
tp->westwood.bw_est = 0; tp->westwood.bw_est = 0;
tp->westwood.accounted = 0; tp->westwood.accounted = 0;
...@@ -2088,14 +2087,13 @@ static inline __u32 westwood_do_filter(__u32 a, __u32 b) ...@@ -2088,14 +2087,13 @@ static inline __u32 westwood_do_filter(__u32 a, __u32 b)
static void westwood_filter(struct sock *sk, __u32 delta) static void westwood_filter(struct sock *sk, __u32 delta)
{ {
struct tcp_opt *tp = tcp_sk(sk); struct tcp_opt *tp = tcp_sk(sk);
__u32 sample = tp->westwood.bk / delta;
tp->westwood.bw_ns_est = tp->westwood.bw_ns_est =
westwood_do_filter(tp->westwood.bw_ns_est, sample); westwood_do_filter(tp->westwood.bw_ns_est,
tp->westwood.bk / delta);
tp->westwood.bw_est = tp->westwood.bw_est =
westwood_do_filter(tp->westwood.bw_est, westwood_do_filter(tp->westwood.bw_est,
tp->westwood.bw_ns_est); tp->westwood.bw_ns_est);
tp->westwood.bw_sample = sample;
} }
/* @westwood_update_rttmin /* @westwood_update_rttmin
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment