diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2005-08-09 23:11:56 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:49:29 -0400 |
commit | 295f7324ff8d9ea58b4d3ec93b1aaa1d80e048a9 (patch) | |
tree | 509c113d2622a28836303590ba1a40cecea59d3b /net/ipv4/tcp.c | |
parent | 0a5578cf8e5e045aaa68643c17ce885426697c6b (diff) |
[ICSK]: Introduce reqsk_queue_prune from code in tcp_synack_timer
With this we're very close to getting all of the current TCP
refactorings in my dccp-2.6 tree merged, next changeset will export
some functions needed by the current DCCP code and then dccp-2.6.git
will be born!
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index a1f812159ced..a4e9eec44895 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -495,7 +495,7 @@ EXPORT_SYMBOL_GPL(inet_csk_listen_start); | |||
495 | * This routine closes sockets which have been at least partially | 495 | * This routine closes sockets which have been at least partially |
496 | * opened, but not yet accepted. | 496 | * opened, but not yet accepted. |
497 | */ | 497 | */ |
498 | static void inet_csk_listen_stop(struct sock *sk) | 498 | void inet_csk_listen_stop(struct sock *sk) |
499 | { | 499 | { |
500 | struct inet_connection_sock *icsk = inet_csk(sk); | 500 | struct inet_connection_sock *icsk = inet_csk(sk); |
501 | struct request_sock *acc_req; | 501 | struct request_sock *acc_req; |
@@ -1947,15 +1947,15 @@ int tcp_setsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
1947 | break; | 1947 | break; |
1948 | 1948 | ||
1949 | case TCP_DEFER_ACCEPT: | 1949 | case TCP_DEFER_ACCEPT: |
1950 | tp->defer_accept = 0; | 1950 | icsk->icsk_accept_queue.rskq_defer_accept = 0; |
1951 | if (val > 0) { | 1951 | if (val > 0) { |
1952 | /* Translate value in seconds to number of | 1952 | /* Translate value in seconds to number of |
1953 | * retransmits */ | 1953 | * retransmits */ |
1954 | while (tp->defer_accept < 32 && | 1954 | while (icsk->icsk_accept_queue.rskq_defer_accept < 32 && |
1955 | val > ((TCP_TIMEOUT_INIT / HZ) << | 1955 | val > ((TCP_TIMEOUT_INIT / HZ) << |
1956 | tp->defer_accept)) | 1956 | icsk->icsk_accept_queue.rskq_defer_accept)) |
1957 | tp->defer_accept++; | 1957 | icsk->icsk_accept_queue.rskq_defer_accept++; |
1958 | tp->defer_accept++; | 1958 | icsk->icsk_accept_queue.rskq_defer_accept++; |
1959 | } | 1959 | } |
1960 | break; | 1960 | break; |
1961 | 1961 | ||
@@ -2058,6 +2058,7 @@ EXPORT_SYMBOL_GPL(tcp_get_info); | |||
2058 | int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, | 2058 | int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, |
2059 | int __user *optlen) | 2059 | int __user *optlen) |
2060 | { | 2060 | { |
2061 | struct inet_connection_sock *icsk = inet_csk(sk); | ||
2061 | struct tcp_sock *tp = tcp_sk(sk); | 2062 | struct tcp_sock *tp = tcp_sk(sk); |
2062 | int val, len; | 2063 | int val, len; |
2063 | 2064 | ||
@@ -2095,7 +2096,7 @@ int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
2095 | val = tp->keepalive_probes ? : sysctl_tcp_keepalive_probes; | 2096 | val = tp->keepalive_probes ? : sysctl_tcp_keepalive_probes; |
2096 | break; | 2097 | break; |
2097 | case TCP_SYNCNT: | 2098 | case TCP_SYNCNT: |
2098 | val = inet_csk(sk)->icsk_syn_retries ? : sysctl_tcp_syn_retries; | 2099 | val = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; |
2099 | break; | 2100 | break; |
2100 | case TCP_LINGER2: | 2101 | case TCP_LINGER2: |
2101 | val = tp->linger2; | 2102 | val = tp->linger2; |
@@ -2103,8 +2104,8 @@ int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
2103 | val = (val ? : sysctl_tcp_fin_timeout) / HZ; | 2104 | val = (val ? : sysctl_tcp_fin_timeout) / HZ; |
2104 | break; | 2105 | break; |
2105 | case TCP_DEFER_ACCEPT: | 2106 | case TCP_DEFER_ACCEPT: |
2106 | val = !tp->defer_accept ? 0 : ((TCP_TIMEOUT_INIT / HZ) << | 2107 | val = !icsk->icsk_accept_queue.rskq_defer_accept ? 0 : |
2107 | (tp->defer_accept - 1)); | 2108 | ((TCP_TIMEOUT_INIT / HZ) << (icsk->icsk_accept_queue.rskq_defer_accept - 1)); |
2108 | break; | 2109 | break; |
2109 | case TCP_WINDOW_CLAMP: | 2110 | case TCP_WINDOW_CLAMP: |
2110 | val = tp->window_clamp; | 2111 | val = tp->window_clamp; |
@@ -2125,7 +2126,7 @@ int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
2125 | return 0; | 2126 | return 0; |
2126 | } | 2127 | } |
2127 | case TCP_QUICKACK: | 2128 | case TCP_QUICKACK: |
2128 | val = !inet_csk(sk)->icsk_ack.pingpong; | 2129 | val = !icsk->icsk_ack.pingpong; |
2129 | break; | 2130 | break; |
2130 | 2131 | ||
2131 | case TCP_CONGESTION: | 2132 | case TCP_CONGESTION: |