diff options
author | John Heffner <jheffner@psc.edu> | 2006-03-20 20:53:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-20 20:53:41 -0500 |
commit | 5d424d5a674f782d0659a3b66d951f412901faee (patch) | |
tree | 579871172044e02e626a90388d19ec55cf2d1fc4 /include | |
parent | 1d60290f27e7dc4bce2c43922d0bfa9abd246fc9 (diff) |
[TCP]: MTU probing
Implementation of packetization layer path mtu discovery for TCP, based on
the internet-draft currently found at
<http://www.ietf.org/internet-drafts/draft-ietf-pmtud-method-05.txt>.
Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sysctl.h | 2 | ||||
-rw-r--r-- | include/net/inet_connection_sock.h | 13 | ||||
-rw-r--r-- | include/net/tcp.h | 9 |
3 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 8ad4beab2888..6e8880ea49e7 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -397,6 +397,8 @@ enum | |||
397 | NET_TCP_CONG_CONTROL=110, | 397 | NET_TCP_CONG_CONTROL=110, |
398 | NET_TCP_ABC=111, | 398 | NET_TCP_ABC=111, |
399 | NET_IPV4_IPFRAG_MAX_DIST=112, | 399 | NET_IPV4_IPFRAG_MAX_DIST=112, |
400 | NET_TCP_MTU_PROBING=113, | ||
401 | NET_TCP_BASE_MSS=114, | ||
400 | }; | 402 | }; |
401 | 403 | ||
402 | enum { | 404 | enum { |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index fa587c94e9d0..b3abe33f4e5f 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -72,6 +72,7 @@ struct inet_connection_sock_af_ops { | |||
72 | * @icsk_probes_out: unanswered 0 window probes | 72 | * @icsk_probes_out: unanswered 0 window probes |
73 | * @icsk_ext_hdr_len: Network protocol overhead (IP/IPv6 options) | 73 | * @icsk_ext_hdr_len: Network protocol overhead (IP/IPv6 options) |
74 | * @icsk_ack: Delayed ACK control data | 74 | * @icsk_ack: Delayed ACK control data |
75 | * @icsk_mtup; MTU probing control data | ||
75 | */ | 76 | */ |
76 | struct inet_connection_sock { | 77 | struct inet_connection_sock { |
77 | /* inet_sock has to be the first member! */ | 78 | /* inet_sock has to be the first member! */ |
@@ -104,6 +105,18 @@ struct inet_connection_sock { | |||
104 | __u16 last_seg_size; /* Size of last incoming segment */ | 105 | __u16 last_seg_size; /* Size of last incoming segment */ |
105 | __u16 rcv_mss; /* MSS used for delayed ACK decisions */ | 106 | __u16 rcv_mss; /* MSS used for delayed ACK decisions */ |
106 | } icsk_ack; | 107 | } icsk_ack; |
108 | struct { | ||
109 | int enabled; | ||
110 | |||
111 | /* Range of MTUs to search */ | ||
112 | int search_high; | ||
113 | int search_low; | ||
114 | |||
115 | /* Information on the current probe. */ | ||
116 | int probe_size; | ||
117 | __u32 probe_seq_start; | ||
118 | __u32 probe_seq_end; | ||
119 | } icsk_mtup; | ||
107 | u32 icsk_ca_priv[16]; | 120 | u32 icsk_ca_priv[16]; |
108 | #define ICSK_CA_PRIV_SIZE (16 * sizeof(u32)) | 121 | #define ICSK_CA_PRIV_SIZE (16 * sizeof(u32)) |
109 | }; | 122 | }; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 77f21c65bbca..16879fa560de 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -60,6 +60,9 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo); | |||
60 | /* Minimal RCV_MSS. */ | 60 | /* Minimal RCV_MSS. */ |
61 | #define TCP_MIN_RCVMSS 536U | 61 | #define TCP_MIN_RCVMSS 536U |
62 | 62 | ||
63 | /* The least MTU to use for probing */ | ||
64 | #define TCP_BASE_MSS 512 | ||
65 | |||
63 | /* After receiving this amount of duplicate ACKs fast retransmit starts. */ | 66 | /* After receiving this amount of duplicate ACKs fast retransmit starts. */ |
64 | #define TCP_FASTRETRANS_THRESH 3 | 67 | #define TCP_FASTRETRANS_THRESH 3 |
65 | 68 | ||
@@ -219,6 +222,8 @@ extern int sysctl_tcp_nometrics_save; | |||
219 | extern int sysctl_tcp_moderate_rcvbuf; | 222 | extern int sysctl_tcp_moderate_rcvbuf; |
220 | extern int sysctl_tcp_tso_win_divisor; | 223 | extern int sysctl_tcp_tso_win_divisor; |
221 | extern int sysctl_tcp_abc; | 224 | extern int sysctl_tcp_abc; |
225 | extern int sysctl_tcp_mtu_probing; | ||
226 | extern int sysctl_tcp_base_mss; | ||
222 | 227 | ||
223 | extern atomic_t tcp_memory_allocated; | 228 | extern atomic_t tcp_memory_allocated; |
224 | extern atomic_t tcp_sockets_allocated; | 229 | extern atomic_t tcp_sockets_allocated; |
@@ -447,6 +452,10 @@ extern int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, | |||
447 | 452 | ||
448 | extern void tcp_initialize_rcv_mss(struct sock *sk); | 453 | extern void tcp_initialize_rcv_mss(struct sock *sk); |
449 | 454 | ||
455 | extern int tcp_mtu_to_mss(struct sock *sk, int pmtu); | ||
456 | extern int tcp_mss_to_mtu(struct sock *sk, int mss); | ||
457 | extern void tcp_mtup_init(struct sock *sk); | ||
458 | |||
450 | static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) | 459 | static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd) |
451 | { | 460 | { |
452 | tp->pred_flags = htonl((tp->tcp_header_len << 26) | | 461 | tp->pred_flags = htonl((tp->tcp_header_len << 26) | |