aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Heffner <jheffner@psc.edu>2006-03-20 21:32:58 -0800
committerDavid S. Miller <davem@davemloft.net>2006-03-20 21:32:58 -0800
commit0e7b13685f9a06949ea3070c97c0f0085a08cd37 (patch)
tree3ba0a11d61dc2dd64d7a93bb5cd70d58a46fec39
parent1d541ddd74802cfa0eb8a3864668851f6cd79bdf (diff)
downloadkernel_samsung_espresso10-0e7b13685f9a06949ea3070c97c0f0085a08cd37.zip
kernel_samsung_espresso10-0e7b13685f9a06949ea3070c97c0f0085a08cd37.tar.gz
kernel_samsung_espresso10-0e7b13685f9a06949ea3070c97c0f0085a08cd37.tar.bz2
[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 f2bb239..542d395 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -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)
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h
index b3abe33..4e5a9ff 100644
--- a/include/net/inet_connection_sock.h
+++ b/include/net/inet_connection_sock.h
@@ -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))
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 0ac388e..195d835 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,
/* 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);
}
}
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8197b5e..518e568 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)
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;
}