From 5eb8148d512cab6343e15d42f96281907c947c5a Mon Sep 17 00:00:00 2001 From: short <> Date: Fri, 22 Sep 2000 15:53:45 +0000 Subject: [PATCH 1/1] Initial import, kernel 2.2.17 & kernel 2.4.0-test8 included. --- Makefile | 14 +++++++ kernel-2.2.17.diff | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ kernel-2.2.sh | 20 ++++++++++ kernel-2.4.0-test8.diff | 47 ++++++++++++++++++++++ kernel-2.4.sh | 20 ++++++++++ versions | 2 + 6 files changed, 205 insertions(+) create mode 100644 Makefile create mode 100644 kernel-2.2.17.diff create mode 100755 kernel-2.2.sh create mode 100644 kernel-2.4.0-test8.diff create mode 100755 kernel-2.4.sh create mode 100644 versions diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9ecb0a4 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +include versions + +all: diffs + +diffs: kernel-2.2.sh kernel-2.4.sh + set -x;for i in $^;do ./$$i;done + +.PHONY: ChangeLog +ChangeLog: + rcs2log >$@ + +.PHONY: clean +clean: + $(RM) -r core *.bak ChangeLog diff --git a/kernel-2.2.17.diff b/kernel-2.2.17.diff new file mode 100644 index 0000000..3b2d3f6 --- /dev/null +++ b/kernel-2.2.17.diff @@ -0,0 +1,102 @@ +diff -ru linux-2.2.17-cut-tcp_rto/include/linux/sysctl.h linux-2.2.17c/include/linux/sysctl.h +--- linux-2.2.17-cut-tcp_rto/include/linux/sysctl.h Sat Jul 22 05:31:27 2000 ++++ linux-2.2.17c/include/linux/sysctl.h Fri Sep 22 15:29:18 2000 +@@ -228,7 +228,8 @@ + NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64, + NET_IPV4_IGMP_MAX_MEMBERSHIPS=65, + NET_IPV4_ALWAYS_DEFRAG=67, +- NET_IPV4_IP_MASQ_UDP_DLOOSE=68 ++ NET_IPV4_IP_MASQ_UDP_DLOOSE=68, ++ NET_TCP_RTO_MAX=69, + }; + + enum { +diff -ru linux-2.2.17-cut-tcp_rto/include/net/tcp.h linux-2.2.17c/include/net/tcp.h +--- linux-2.2.17-cut-tcp_rto/include/net/tcp.h Fri May 5 22:25:17 2000 ++++ linux-2.2.17c/include/net/tcp.h Fri Sep 22 16:08:55 2000 +@@ -558,6 +558,10 @@ + extern __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, + __u16 *mss); + ++/* tcp_input.c */ ++ ++extern int sysctl_tcp_rto_max; ++ + /* tcp_output.c */ + + extern void tcp_read_wakeup(struct sock *); +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 +--- linux-2.2.17-cut-tcp_rto/net/ipv4/sysctl_net_ipv4.c Sat Jul 22 05:31:27 2000 ++++ linux-2.2.17c/net/ipv4/sysctl_net_ipv4.c Fri Sep 22 15:33:55 2000 +@@ -207,6 +207,8 @@ + {NET_IPV4_IGMP_MAX_MEMBERSHIPS, "igmp_max_memberships", + &sysctl_igmp_max_memberships, sizeof(int), 0644, NULL, &proc_dointvec}, + #endif ++ {NET_TCP_RTO_MAX, "tcp_rto_max", ++ &sysctl_tcp_rto_max, sizeof(int), 0644, NULL, &proc_dointvec}, + {0} + }; + +diff -ru linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_input.c linux-2.2.17c/net/ipv4/tcp_input.c +--- linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_input.c Fri Sep 22 15:44:20 2000 ++++ linux-2.2.17c/net/ipv4/tcp_input.c Fri Sep 22 15:42:44 2000 +@@ -83,6 +83,8 @@ + int sysctl_tcp_stdurg; + int sysctl_tcp_rfc1337; + ++int sysctl_tcp_rto_max = 120*HZ; ++ + static int prune_queue(struct sock *sk); + + /* There is something which you must keep in mind when you analyze the +@@ -204,8 +206,8 @@ + */ + static __inline__ void tcp_bound_rto(struct tcp_opt *tp) + { +- if (tp->rto > 120*HZ) +- tp->rto = 120*HZ; ++ if (tp->rto > sysctl_tcp_rto_max) ++ tp->rto = sysctl_tcp_rto_max; + if (tp->rto < HZ/5) + tp->rto = HZ/5; + } +@@ -682,7 +684,7 @@ + tcp_clear_xmit_timer(sk, TIME_PROBE0); + } else { + tcp_reset_xmit_timer(sk, TIME_PROBE0, +- min(tp->rto << tp->backoff, 120*HZ)); ++ min(tp->rto << tp->backoff, sysctl_tcp_rto_max)); + } + } + +diff -ru linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_output.c linux-2.2.17c/net/ipv4/tcp_output.c +--- linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_output.c Fri Sep 22 15:44:20 2000 ++++ linux-2.2.17c/net/ipv4/tcp_output.c Fri Sep 22 15:42:44 2000 +@@ -1174,5 +1174,5 @@ + tp->backoff++; + tp->probes_out++; + tcp_reset_xmit_timer (sk, TIME_PROBE0, +- min(tp->rto << tp->backoff, 120*HZ)); ++ min(tp->rto << tp->backoff, sysctl_tcp_rto_max)); + } +diff -ru linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_timer.c linux-2.2.17c/net/ipv4/tcp_timer.c +--- linux-2.2.17-cut-tcp_rto/net/ipv4/tcp_timer.c Sat Jul 22 05:31:27 2000 ++++ linux-2.2.17c/net/ipv4/tcp_timer.c Fri Sep 22 15:33:32 2000 +@@ -501,7 +501,7 @@ + * the 120 second clamps though! + */ + tp->backoff++; +- tp->rto = min(tp->rto << 1, 120*HZ); ++ tp->rto = min(tp->rto << 1, sysctl_tcp_rto_max); + tcp_reset_xmit_timer(sk, TIME_RETRANS, tp->rto); + + tcp_write_timeout(sk); +@@ -566,7 +566,7 @@ + #endif + timeo = min((TCP_TIMEOUT_INIT + << conn->retrans), +- 120*HZ); ++ sysctl_tcp_rto_max); + conn->expires = now + timeo; + op = prev->dl_next; + tcp_synq_queue(tp, conn); diff --git a/kernel-2.2.sh b/kernel-2.2.sh new file mode 100755 index 0000000..e1e6725 --- /dev/null +++ b/kernel-2.2.sh @@ -0,0 +1,20 @@ +#! /bin/sh +. versions +( + cd /usr/src + diff -ru linux-$kernel22_ver-cut-tcp_rto linux-${kernel22_ver}c 2>/dev/null|grep -v '^Only in\|Binary files' +) >kernel-$kernel22_ver.diff.new +if \ + test '!' -f kernel-$kernel22_ver.diff || \ + diff -u kernel-$kernel22_ver.diff kernel-$kernel22_ver.diff.new| \ + sed -e 's/^[+-]+++[^+].*$//' -e 's/^[+-][+-][+-][^+].*$//' | \ + grep -q '^[+-]'; \ + then + echo CHANGED. + test '!' -f kernel-$kernel22_ver.diff || \ + mv -f kernel-$kernel22_ver.diff kernel-$kernel22_ver.diff.bak + mv -f kernel-$kernel22_ver.diff.new kernel-$kernel22_ver.diff +else + echo Not changed. + rm -f kernel-$kernel22_ver.diff.new +fi diff --git a/kernel-2.4.0-test8.diff b/kernel-2.4.0-test8.diff new file mode 100644 index 0000000..a4bde3c --- /dev/null +++ b/kernel-2.4.0-test8.diff @@ -0,0 +1,47 @@ +diff -ru linux-2.4.0-test8-cut-tcp_rto/include/linux/sysctl.h linux-2.4.0-test8c/include/linux/sysctl.h +--- linux-2.4.0-test8-cut-tcp_rto/include/linux/sysctl.h Fri Sep 22 16:17:46 2000 ++++ linux-2.4.0-test8c/include/linux/sysctl.h Fri Sep 22 17:30:12 2000 +@@ -269,6 +269,7 @@ + NET_TCP_RMEM=85, + NET_TCP_APP_WIN=86, + NET_TCP_ADV_WIN_SCALE=87, ++ NET_TCP_RTO_MAX=88, + }; + + enum { +diff -ru linux-2.4.0-test8-cut-tcp_rto/include/net/tcp.h linux-2.4.0-test8c/include/net/tcp.h +--- linux-2.4.0-test8-cut-tcp_rto/include/net/tcp.h Fri Sep 22 16:17:46 2000 ++++ linux-2.4.0-test8c/include/net/tcp.h Fri Sep 22 16:19:55 2000 +@@ -299,7 +299,8 @@ + #define TCP_DELACK_MIN (2) /* minimal time to delay before sending an ACK, + * 2 scheduler ticks, not depending on HZ. */ + #define TCP_ATO_MIN 2 +-#define TCP_RTO_MAX (120*HZ) ++#define TCP_RTO_MAX_init (120*HZ) ++extern int TCP_RTO_MAX; + #define TCP_RTO_MIN (HZ/5) + #define TCP_TIMEOUT_INIT (3*HZ) /* RFC 1122 initial RTO value */ + +diff -ru linux-2.4.0-test8-cut-tcp_rto/net/ipv4/sysctl_net_ipv4.c linux-2.4.0-test8c/net/ipv4/sysctl_net_ipv4.c +--- linux-2.4.0-test8-cut-tcp_rto/net/ipv4/sysctl_net_ipv4.c Fri Sep 22 16:17:55 2000 ++++ linux-2.4.0-test8c/net/ipv4/sysctl_net_ipv4.c Fri Sep 22 17:30:29 2000 +@@ -229,6 +229,8 @@ + &sysctl_tcp_app_win, sizeof(int), 0644, NULL, &proc_dointvec}, + {NET_TCP_ADV_WIN_SCALE, "tcp_adv_win_scale", + &sysctl_tcp_adv_win_scale, sizeof(int), 0644, NULL, &proc_dointvec}, ++ {NET_TCP_RTO_MAX, "tcp_rto_max", ++ &TCP_RTO_MAX, sizeof(int), 0644, NULL, &proc_dointvec}, + {0} + }; + +diff -ru linux-2.4.0-test8-cut-tcp_rto/net/ipv4/tcp_timer.c linux-2.4.0-test8c/net/ipv4/tcp_timer.c +--- linux-2.4.0-test8-cut-tcp_rto/net/ipv4/tcp_timer.c Fri Sep 22 16:17:47 2000 ++++ linux-2.4.0-test8c/net/ipv4/tcp_timer.c Fri Sep 22 16:22:09 2000 +@@ -30,6 +30,7 @@ + int sysctl_tcp_retries1 = TCP_RETR1; + int sysctl_tcp_retries2 = TCP_RETR2; + int sysctl_tcp_orphan_retries = 0; ++int TCP_RTO_MAX = TCP_RTO_MAX_init; + + static void tcp_write_timer(unsigned long); + static void tcp_delack_timer(unsigned long); diff --git a/kernel-2.4.sh b/kernel-2.4.sh new file mode 100755 index 0000000..04e1be9 --- /dev/null +++ b/kernel-2.4.sh @@ -0,0 +1,20 @@ +#! /bin/sh +. versions +( + cd /usr/src + diff -ru linux-$kernel24_ver-cut-tcp_rto linux-${kernel24_ver}c 2>/dev/null|grep -v '^Only in\|Binary files' +) >kernel-$kernel24_ver.diff.new +if \ + test '!' -f kernel-$kernel24_ver.diff || \ + diff -u kernel-$kernel24_ver.diff kernel-$kernel24_ver.diff.new | \ + sed -e 's/^[+-]+++[^+].*$//' -e 's/^[+-][+-][+-][^+].*$//' | \ + grep -q '^[+-]'; \ + then + echo CHANGED. + test '!' -f kernel-$kernel24_ver.diff || \ + mv -f kernel-$kernel24_ver.diff kernel-$kernel24_ver.diff.bak + mv -f kernel-$kernel24_ver.diff.new kernel-$kernel24_ver.diff +else + echo Not changed. + rm -f kernel-$kernel24_ver.diff.new +fi diff --git a/versions b/versions new file mode 100644 index 0000000..487810e --- /dev/null +++ b/versions @@ -0,0 +1,2 @@ +kernel22_ver=2.2.17 +kernel24_ver=2.4.0-test8 -- 1.8.3.1