[TCP] mtu probing: move tcp-specific data out of inet_connection_sock
authorJohn Heffner <jheffner@psc.edu>
Tue, 21 Mar 2006 05:32:58 +0000 (21:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Mar 2006 05:32:58 +0000 (21:32 -0800)
This moves some TCP-specific MTU probing state out of
inet_connection_sock back to tcp_sock.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/tcp.h
include/net/inet_connection_sock.h
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c

index f2bb2396853f5319000e70bcb9bf71784e933c18..542d39596bd86f0c7cdc84b58977b4da440590a2 100644 (file)
@@ -343,6 +343,12 @@ struct tcp_sock {
                __u32   seq;
                __u32   time;
        } rcvq_space;
+
+/* TCP-specific MTU probe information. */
+       struct {
+               __u32             probe_seq_start;
+               __u32             probe_seq_end;
+       } mtu_probe;
 };
 
 static inline struct tcp_sock *tcp_sk(const struct sock *sk)
index b3abe33f4e5f122ec7e68bc43b94fec50ad4f041..4e5a9ff99fc3d08af5519369c9ab887b59fdb06c 100644 (file)
@@ -114,8 +114,6 @@ struct inet_connection_sock {
 
                /* Information on the current probe. */
                int               probe_size;
-               __u32             probe_seq_start;
-               __u32             probe_seq_end;
        } icsk_mtup;
        u32                       icsk_ca_priv[16];
 #define ICSK_CA_PRIV_SIZE      (16 * sizeof(u32))
index 0ac388e3d01dfc451f4141dfaed4da777c634819..195d8358455839cb77e8e48b1a99a60e74623fe9 100644 (file)
@@ -2054,7 +2054,7 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
                /* MTU probe failure: don't reduce cwnd */
                if (icsk->icsk_ca_state < TCP_CA_CWR &&
                    icsk->icsk_mtup.probe_size &&
-                   tp->snd_una == icsk->icsk_mtup.probe_seq_start) {
+                   tp->snd_una == tp->mtu_probe.probe_seq_start) {
                        tcp_mtup_probe_failed(sk);
                        /* Restores the reduction we did in tcp_mtup_probe() */
                        tp->snd_cwnd++;
@@ -2284,7 +2284,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
 
                /* MTU probing checks */
                if (icsk->icsk_mtup.probe_size) {
-                       if (!after(icsk->icsk_mtup.probe_seq_end, TCP_SKB_CB(skb)->end_seq)) {
+                       if (!after(tp->mtu_probe.probe_seq_end, TCP_SKB_CB(skb)->end_seq)) {
                                tcp_mtup_probe_success(sk, skb);
                        }
                }
index 8197b5e12f1fdc37a1ba9a871012deca60d9f939..518e568b53f32f8a6eeb186f8ee8a59b80fe8de2 100644 (file)
@@ -1238,8 +1238,8 @@ static int tcp_mtu_probe(struct sock *sk)
                update_send_head(sk, tp, nskb);
 
                icsk->icsk_mtup.probe_size = tcp_mss_to_mtu(sk, nskb->len);
-               icsk->icsk_mtup.probe_seq_start = TCP_SKB_CB(nskb)->seq;
-               icsk->icsk_mtup.probe_seq_end = TCP_SKB_CB(nskb)->end_seq;
+               tp->mtu_probe.probe_seq_start = TCP_SKB_CB(nskb)->seq;
+               tp->mtu_probe.probe_seq_end = TCP_SKB_CB(nskb)->end_seq;
 
                return 1;
        }