aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Heffner <jheffner@psc.edu>2006-03-21 00:32:58 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 00:32:58 -0500
commit0e7b13685f9a06949ea3070c97c0f0085a08cd37 (patch)
tree3ba0a11d61dc2dd64d7a93bb5cd70d58a46fec39
parent1d541ddd74802cfa0eb8a3864668851f6cd79bdf (diff)
[TCP] mtu probing: move tcp-specific data out of inet_connection_sock
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>
-rw-r--r--include/linux/tcp.h6
-rw-r--r--include/net/inet_connection_sock.h2
-rw-r--r--net/ipv4/tcp_input.c4
-rw-r--r--net/ipv4/tcp_output.c4
4 files changed, 10 insertions, 6 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index f2bb2396853f..542d39596bd8 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -343,6 +343,12 @@ struct tcp_sock {
343 __u32 seq; 343 __u32 seq;
344 __u32 time; 344 __u32 time;
345 } rcvq_space; 345 } rcvq_space;
346
347/* TCP-specific MTU probe information. */
348 struct {
349 __u32 probe_seq_start;
350 __u32 probe_seq_end;
351 } mtu_probe;
346}; 352};
347 353
348static inline struct tcp_sock *tcp_sk(const struct sock *sk) 354static inline struct tcp_sock *tcp_sk(const struct sock *sk)
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index b3abe33f4e5f..4e5a9ff99fc3 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -114,8 +114,6 @@ struct inet_connection_sock {
114 114
115 /* Information on the current probe. */ 115 /* Information on the current probe. */
116 int probe_size; 116 int probe_size;
117 __u32 probe_seq_start;
118 __u32 probe_seq_end;
119 } icsk_mtup; 117 } icsk_mtup;
120 u32 icsk_ca_priv[16]; 118 u32 icsk_ca_priv[16];
121#define ICSK_CA_PRIV_SIZE (16 * sizeof(u32)) 119#define ICSK_CA_PRIV_SIZE (16 * sizeof(u32))
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 0ac388e3d01d..195d83584558 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2054,7 +2054,7 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
2054 /* MTU probe failure: don't reduce cwnd */ 2054 /* MTU probe failure: don't reduce cwnd */
2055 if (icsk->icsk_ca_state < TCP_CA_CWR && 2055 if (icsk->icsk_ca_state < TCP_CA_CWR &&
2056 icsk->icsk_mtup.probe_size && 2056 icsk->icsk_mtup.probe_size &&
2057 tp->snd_una == icsk->icsk_mtup.probe_seq_start) { 2057 tp->snd_una == tp->mtu_probe.probe_seq_start) {
2058 tcp_mtup_probe_failed(sk); 2058 tcp_mtup_probe_failed(sk);
2059 /* Restores the reduction we did in tcp_mtup_probe() */ 2059 /* Restores the reduction we did in tcp_mtup_probe() */
2060 tp->snd_cwnd++; 2060 tp->snd_cwnd++;
@@ -2284,7 +2284,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, __s32 *seq_rtt_p)
2284 2284
2285 /* MTU probing checks */ 2285 /* MTU probing checks */
2286 if (icsk->icsk_mtup.probe_size) { 2286 if (icsk->icsk_mtup.probe_size) {
2287 if (!after(icsk->icsk_mtup.probe_seq_end, TCP_SKB_CB(skb)->end_seq)) { 2287 if (!after(tp->mtu_probe.probe_seq_end, TCP_SKB_CB(skb)->end_seq)) {
2288 tcp_mtup_probe_success(sk, skb); 2288 tcp_mtup_probe_success(sk, skb);
2289 } 2289 }
2290 } 2290 }
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8197b5e12f1f..518e568b53f3 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1238,8 +1238,8 @@ static int tcp_mtu_probe(struct sock *sk)
1238 update_send_head(sk, tp, nskb); 1238 update_send_head(sk, tp, nskb);
1239 1239
1240 icsk->icsk_mtup.probe_size = tcp_mss_to_mtu(sk, nskb->len); 1240 icsk->icsk_mtup.probe_size = tcp_mss_to_mtu(sk, nskb->len);
1241 icsk->icsk_mtup.probe_seq_start = TCP_SKB_CB(nskb)->seq; 1241 tp->mtu_probe.probe_seq_start = TCP_SKB_CB(nskb)->seq;
1242 icsk->icsk_mtup.probe_seq_end = TCP_SKB_CB(nskb)->end_seq; 1242 tp->mtu_probe.probe_seq_end = TCP_SKB_CB(nskb)->end_seq;
1243 1243
1244 return 1; 1244 return 1;
1245 } 1245 }