Skip to contentSkip to conversation

(repost) TCP westwood bw_sample

PATCH Applied Stephen Hemminger 2 participants 2 messages Mar 12, 2004 – Mar 15, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 (repost) TCP westwood bw_sample

TCP westwood bw_sample element in tcp_opt is set but never used. Repost of patch, because forgot part which removes it from tcp.h

include/linux/tcp.h +0 -1
diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h
@@ -377,7 +377,6 @@
 
 /* TCP Westwood structure */
         struct {
-                __u32    bw_sample;        /* bandwidth sample */
                 __u32    bw_ns_est;        /* first bandwidth estimation..not too smoothed 8) */
                 __u32    bw_est;           /* bandwidth estimate */
                 __u32    rtt_win_sx;       /* here starts a new evaluation... */
net/ipv4/tcp_input.c +2 -4
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
@@ -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
#1 lore raw
Quoted 2 lines · On Fri, 12 Mar 2004 09:30:10 -0800 Stephen Hemminger <[email protected]>…

TCP westwood bw_sample element in tcp_opt is set but never used. Repost of patch, because forgot part which removes it from tcp.h

Applied, thanks Stephen.