aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-08-10 03:03:31 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:56:18 -0400
commit6687e988d9aeaccad6774e6a8304f681f3ec0a03 (patch)
treeecd3d28f9989847aa1dcde4782de0210aeadc290 /net/ipv6
parent64ce207306debd7157f47282be94770407bec01c (diff)
[ICSK]: Move TCP congestion avoidance members to icsk
This changeset basically moves tcp_sk()->{ca_ops,ca_state,etc} to inet_csk(), minimal renaming/moving done in this changeset to ease review. Most of it is just changes of struct tcp_sock * to struct sock * parameters. With this we move to a state closer to two interesting goals: 1. Generalisation of net/ipv4/tcp_diag.c, becoming inet_diag.c, being used for any INET transport protocol that has struct inet_hashinfo and are derived from struct inet_connection_sock. Keeps the userspace API, that will just not display DCCP sockets, while newer versions of tools can support DCCP. 2. INET generic transport pluggable Congestion Avoidance infrastructure, using the current TCP CA infrastructure with DCCP. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/tcp_ipv6.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 08c55b024704..3312cb8742e2 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -2010,13 +2010,14 @@ static struct tcp_func ipv6_mapped = {
2010 */ 2010 */
2011static int tcp_v6_init_sock(struct sock *sk) 2011static int tcp_v6_init_sock(struct sock *sk)
2012{ 2012{
2013 struct inet_connection_sock *icsk = inet_csk(sk);
2013 struct tcp_sock *tp = tcp_sk(sk); 2014 struct tcp_sock *tp = tcp_sk(sk);
2014 2015
2015 skb_queue_head_init(&tp->out_of_order_queue); 2016 skb_queue_head_init(&tp->out_of_order_queue);
2016 tcp_init_xmit_timers(sk); 2017 tcp_init_xmit_timers(sk);
2017 tcp_prequeue_init(tp); 2018 tcp_prequeue_init(tp);
2018 2019
2019 inet_csk(sk)->icsk_rto = TCP_TIMEOUT_INIT; 2020 icsk->icsk_rto = TCP_TIMEOUT_INIT;
2020 tp->mdev = TCP_TIMEOUT_INIT; 2021 tp->mdev = TCP_TIMEOUT_INIT;
2021 2022
2022 /* So many TCP implementations out there (incorrectly) count the 2023 /* So many TCP implementations out there (incorrectly) count the
@@ -2038,7 +2039,7 @@ static int tcp_v6_init_sock(struct sock *sk)
2038 sk->sk_state = TCP_CLOSE; 2039 sk->sk_state = TCP_CLOSE;
2039 2040
2040 tp->af_specific = &ipv6_specific; 2041 tp->af_specific = &ipv6_specific;
2041 tp->ca_ops = &tcp_init_congestion_ops; 2042 icsk->icsk_ca_ops = &tcp_init_congestion_ops;
2042 sk->sk_write_space = sk_stream_write_space; 2043 sk->sk_write_space = sk_stream_write_space;
2043 sock_set_flag(sk, SOCK_USE_WRITE_QUEUE); 2044 sock_set_flag(sk, SOCK_USE_WRITE_QUEUE);
2044 2045
@@ -2135,7 +2136,7 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i)
2135 jiffies_to_clock_t(timer_expires - jiffies), 2136 jiffies_to_clock_t(timer_expires - jiffies),
2136 icsk->icsk_retransmits, 2137 icsk->icsk_retransmits,
2137 sock_i_uid(sp), 2138 sock_i_uid(sp),
2138 tp->probes_out, 2139 icsk->icsk_probes_out,
2139 sock_i_ino(sp), 2140 sock_i_ino(sp),
2140 atomic_read(&sp->sk_refcnt), sp, 2141 atomic_read(&sp->sk_refcnt), sp,
2141 icsk->icsk_rto, 2142 icsk->icsk_rto,