diff options
-rw-r--r-- | Documentation/networking/dccp.txt | 26 | ||||
-rw-r--r-- | net/dccp/ccids/ccid2.c | 5 |
2 files changed, 23 insertions, 8 deletions
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index a62fdf7a6bf..cdb64922ba1 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -1,18 +1,20 @@ | |||
1 | DCCP protocol | 1 | DCCP protocol |
2 | ============ | 2 | ============= |
3 | 3 | ||
4 | 4 | ||
5 | Contents | 5 | Contents |
6 | ======== | 6 | ======== |
7 | |||
8 | - Introduction | 7 | - Introduction |
9 | - Missing features | 8 | - Missing features |
10 | - Socket options | 9 | - Socket options |
10 | - Sysctl variables | ||
11 | - IOCTLs | ||
12 | - Other tunables | ||
11 | - Notes | 13 | - Notes |
12 | 14 | ||
15 | |||
13 | Introduction | 16 | Introduction |
14 | ============ | 17 | ============ |
15 | |||
16 | Datagram Congestion Control Protocol (DCCP) is an unreliable, connection | 18 | Datagram Congestion Control Protocol (DCCP) is an unreliable, connection |
17 | oriented protocol designed to solve issues present in UDP and TCP, particularly | 19 | oriented protocol designed to solve issues present in UDP and TCP, particularly |
18 | for real-time and multimedia (streaming) traffic. | 20 | for real-time and multimedia (streaming) traffic. |
@@ -29,9 +31,9 @@ It has a base protocol and pluggable congestion control IDs (CCIDs). | |||
29 | DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol | 31 | DCCP is a Proposed Standard (RFC 2026), and the homepage for DCCP as a protocol |
30 | is at http://www.ietf.org/html.charters/dccp-charter.html | 32 | is at http://www.ietf.org/html.charters/dccp-charter.html |
31 | 33 | ||
34 | |||
32 | Missing features | 35 | Missing features |
33 | ================ | 36 | ================ |
34 | |||
35 | The Linux DCCP implementation does not currently support all the features that are | 37 | The Linux DCCP implementation does not currently support all the features that are |
36 | specified in RFCs 4340...42. | 38 | specified in RFCs 4340...42. |
37 | 39 | ||
@@ -45,7 +47,6 @@ http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree | |||
45 | 47 | ||
46 | Socket options | 48 | Socket options |
47 | ============== | 49 | ============== |
48 | |||
49 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of | 50 | DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of |
50 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, | 51 | service codes (RFC 4340, sec. 8.1.2); if this socket option is not set, |
51 | the socket will fall back to 0 (which means that no meaningful service code | 52 | the socket will fall back to 0 (which means that no meaningful service code |
@@ -112,6 +113,7 @@ DCCP_SOCKOPT_CCID_TX_INFO | |||
112 | On unidirectional connections it is useful to close the unused half-connection | 113 | On unidirectional connections it is useful to close the unused half-connection |
113 | via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs. | 114 | via shutdown (SHUT_WR or SHUT_RD): this will reduce per-packet processing costs. |
114 | 115 | ||
116 | |||
115 | Sysctl variables | 117 | Sysctl variables |
116 | ================ | 118 | ================ |
117 | Several DCCP default parameters can be managed by the following sysctls | 119 | Several DCCP default parameters can be managed by the following sysctls |
@@ -155,15 +157,27 @@ sync_ratelimit = 125 ms | |||
155 | sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit | 157 | sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit |
156 | of this parameter is milliseconds; a value of 0 disables rate-limiting. | 158 | of this parameter is milliseconds; a value of 0 disables rate-limiting. |
157 | 159 | ||
160 | |||
158 | IOCTLS | 161 | IOCTLS |
159 | ====== | 162 | ====== |
160 | FIONREAD | 163 | FIONREAD |
161 | Works as in udp(7): returns in the `int' argument pointer the size of | 164 | Works as in udp(7): returns in the `int' argument pointer the size of |
162 | the next pending datagram in bytes, or 0 when no datagram is pending. | 165 | the next pending datagram in bytes, or 0 when no datagram is pending. |
163 | 166 | ||
167 | |||
168 | Other tunables | ||
169 | ============== | ||
170 | Per-route rto_min support | ||
171 | CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value | ||
172 | of the RTO timer. This setting can be modified via the 'rto_min' option | ||
173 | of iproute2; for example: | ||
174 | > ip route change 10.0.0.0/24 rto_min 250j dev wlan0 | ||
175 | > ip route add 10.0.0.254/32 rto_min 800j dev wlan0 | ||
176 | > ip route show dev wlan0 | ||
177 | |||
178 | |||
164 | Notes | 179 | Notes |
165 | ===== | 180 | ===== |
166 | |||
167 | DCCP does not travel through NAT successfully at present on many boxes. This is | 181 | DCCP does not travel through NAT successfully at present on many boxes. This is |
168 | because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT | 182 | because the checksum covers the pseudo-header as per TCP and UDP. Linux NAT |
169 | support for DCCP has been added. | 183 | support for DCCP has been added. |
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index b9c942a09c9..dc18172b1e5 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -325,8 +325,9 @@ static void ccid2_rtt_estimator(struct sock *sk, const long mrtt) | |||
325 | hc->tx_srtt = m << 3; | 325 | hc->tx_srtt = m << 3; |
326 | hc->tx_mdev = m << 1; | 326 | hc->tx_mdev = m << 1; |
327 | 327 | ||
328 | hc->tx_mdev_max = max(TCP_RTO_MIN, hc->tx_mdev); | 328 | hc->tx_mdev_max = max(hc->tx_mdev, tcp_rto_min(sk)); |
329 | hc->tx_rttvar = hc->tx_mdev_max; | 329 | hc->tx_rttvar = hc->tx_mdev_max; |
330 | |||
330 | hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss; | 331 | hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss; |
331 | } else { | 332 | } else { |
332 | /* Update scaled SRTT as SRTT += 1/8 * (m - SRTT) */ | 333 | /* Update scaled SRTT as SRTT += 1/8 * (m - SRTT) */ |
@@ -367,7 +368,7 @@ static void ccid2_rtt_estimator(struct sock *sk, const long mrtt) | |||
367 | hc->tx_rttvar -= (hc->tx_rttvar - | 368 | hc->tx_rttvar -= (hc->tx_rttvar - |
368 | hc->tx_mdev_max) >> 2; | 369 | hc->tx_mdev_max) >> 2; |
369 | hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss; | 370 | hc->tx_rtt_seq = dccp_sk(sk)->dccps_gss; |
370 | hc->tx_mdev_max = TCP_RTO_MIN; | 371 | hc->tx_mdev_max = tcp_rto_min(sk); |
371 | } | 372 | } |
372 | } | 373 | } |
373 | 374 | ||