netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] TCP westwood bw_sample set never used
@ 2004-03-12 17:15 Stephen Hemminger
  2004-03-13 16:27 ` Angelo Dell'Aera
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2004-03-12 17:15 UTC (permalink / raw)
  To: Angelo Dell'Aera, David S. Miller; +Cc: netdev

Found this while looking in detail at TCP.  The westwood.bw_sample element
it tcp_opt is set but not used by the existing code in 2.6.4

diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c	Fri Mar 12 09:11:42 2004
+++ b/net/ipv4/tcp_input.c	Fri Mar 12 09:11:42 2004
@@ -2065,7 +2065,6 @@
 {
         struct tcp_opt *tp = tcp_sk(sk);
 
-        tp->westwood.bw_sample = 0;
         tp->westwood.bw_ns_est = 0;
         tp->westwood.bw_est = 0;
         tp->westwood.accounted = 0;
@@ -2088,14 +2087,13 @@
 static void westwood_filter(struct sock *sk, __u32 delta)
 {
 	struct tcp_opt *tp = tcp_sk(sk);
-	__u32 sample = tp->westwood.bk / delta;
 
 	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 =
 		westwood_do_filter(tp->westwood.bw_est,
 				   tp->westwood.bw_ns_est);
-	tp->westwood.bw_sample = sample;
 }
 
 /* @westwood_update_rttmin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-13 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-12 17:15 [PATCH] TCP westwood bw_sample set never used Stephen Hemminger
2004-03-13 16:27 ` Angelo Dell'Aera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).