Kernel patch update to 2.4.0-test10.
[tcp_rto.git] / kernel-2.2.17.diff
1 diff -ru linux-2.2.17-cut-tcp_rto/include/linux/sysctl.h linux-2.2.17c/include/linux/sysctl.h
2 --- linux-2.2.17-cut-tcp_rto/include/linux/sysctl.h     Sat Jul 22 05:31:27 2000
3 +++ linux-2.2.17c/include/linux/sysctl.h        Fri Sep 22 15:29:18 2000
4 @@ -228,7 +228,8 @@
5         NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64,
6         NET_IPV4_IGMP_MAX_MEMBERSHIPS=65,
7         NET_IPV4_ALWAYS_DEFRAG=67,
8 -       NET_IPV4_IP_MASQ_UDP_DLOOSE=68
9 +       NET_IPV4_IP_MASQ_UDP_DLOOSE=68,
10 +       NET_TCP_RTO_MAX=69,
11  };
12  
13  enum {
14 diff -ru linux-2.2.17-cut-tcp_rto/include/net/tcp.h linux-2.2.17c/include/net/tcp.h
15 --- linux-2.2.17-cut-tcp_rto/include/net/tcp.h  Fri May  5 22:25:17 2000
16 +++ linux-2.2.17c/include/net/tcp.h     Fri Sep 22 16:08:55 2000
17 @@ -558,6 +558,10 @@
18  extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, 
19                                      __u16 *mss);
20  
21 +/* tcp_input.c */
22 +
23 +extern int sysctl_tcp_rto_max;
24 +
25  /* tcp_output.c */
26  
27  extern void tcp_read_wakeup(struct sock *);
28 diff -ru linux-2.2.17-cut-tcp_rto/net/ipv4/sysctl_net_ipv4.c linux-2.2.17c/net/ipv4/sysctl_net_ipv4.c
29 --- linux-2.2.17-cut-tcp_rto/net/ipv4/sysctl_net_ipv4.c Sat Jul 22 05:31:27 2000
30 +++ linux-2.2.17c/net/ipv4/sysctl_net_ipv4.c    Fri Sep 22 15:33:55 2000
31 @@ -207,6 +207,8 @@
32         {NET_IPV4_IGMP_MAX_MEMBERSHIPS, "igmp_max_memberships",
33          &sysctl_igmp_max_memberships, sizeof(int), 0644, NULL, &proc_dointvec},
34  #endif
35 +       {NET_TCP_RTO_MAX, "tcp_rto_max",
36 +        &sysctl_tcp_rto_max, sizeof(int), 0644, NULL, &proc_dointvec},
37         {0}
38  };
39  
40 diff -ru linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_input.c linux-2.2.17c/net/ipv4/tcp_input.c
41 --- linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_input.c       Fri Sep 22 15:44:20 2000
42 +++ linux-2.2.17c/net/ipv4/tcp_input.c  Fri Sep 22 15:42:44 2000
43 @@ -83,6 +83,8 @@
44  int sysctl_tcp_stdurg;
45  int sysctl_tcp_rfc1337;
46  
47 +int sysctl_tcp_rto_max = 120*HZ;
48 +
49  static int prune_queue(struct sock *sk);
50  
51  /* There is something which you must keep in mind when you analyze the
52 @@ -204,8 +206,8 @@
53   */
54  static __inline__ void tcp_bound_rto(struct tcp_opt *tp)
55  {
56 -       if (tp->rto > 120*HZ)
57 -               tp->rto = 120*HZ;
58 +       if (tp->rto > sysctl_tcp_rto_max)
59 +               tp->rto = sysctl_tcp_rto_max;
60         if (tp->rto < HZ/5)
61                 tp->rto = HZ/5;
62  }
63 @@ -682,7 +684,7 @@
64                 tcp_clear_xmit_timer(sk, TIME_PROBE0);
65         } else {
66                 tcp_reset_xmit_timer(sk, TIME_PROBE0,
67 -                                    min(tp->rto << tp->backoff, 120*HZ));
68 +                                    min(tp->rto << tp->backoff, sysctl_tcp_rto_max));
69         }
70  }
71   
72 diff -ru linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_output.c linux-2.2.17c/net/ipv4/tcp_output.c
73 --- linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_output.c      Fri Sep 22 15:44:20 2000
74 +++ linux-2.2.17c/net/ipv4/tcp_output.c Fri Sep 22 15:42:44 2000
75 @@ -1174,5 +1174,5 @@
76         tp->backoff++;
77         tp->probes_out++;
78         tcp_reset_xmit_timer (sk, TIME_PROBE0, 
79 -                             min(tp->rto << tp->backoff, 120*HZ));
80 +                             min(tp->rto << tp->backoff, sysctl_tcp_rto_max));
81  }
82 diff -ru linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_timer.c linux-2.2.17c/net/ipv4/tcp_timer.c
83 --- linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_timer.c       Sat Jul 22 05:31:27 2000
84 +++ linux-2.2.17c/net/ipv4/tcp_timer.c  Fri Sep 22 15:33:32 2000
85 @@ -501,7 +501,7 @@
86          * the 120 second clamps though!
87          */
88         tp->backoff++;
89 -       tp->rto = min(tp->rto << 1, 120*HZ);
90 +       tp->rto = min(tp->rto << 1, sysctl_tcp_rto_max);
91         tcp_reset_xmit_timer(sk, TIME_RETRANS, tp->rto);
92  
93         tcp_write_timeout(sk);
94 @@ -566,7 +566,7 @@
95  #endif
96                                                 timeo = min((TCP_TIMEOUT_INIT 
97                                                              << conn->retrans),
98 -                                                           120*HZ);
99 +                                                           sysctl_tcp_rto_max);
100                                                 conn->expires = now + timeo;
101                                                 op = prev->dl_next; 
102                                                 tcp_synq_queue(tp, conn);