diff options
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 11 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index ec5de02f543f..7f98aa3962c6 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -168,7 +168,16 @@ tcp_dsack - BOOLEAN | |||
168 | Allows TCP to send "duplicate" SACKs. | 168 | Allows TCP to send "duplicate" SACKs. |
169 | 169 | ||
170 | tcp_ecn - BOOLEAN | 170 | tcp_ecn - BOOLEAN |
171 | Enable Explicit Congestion Notification in TCP. | 171 | Enable Explicit Congestion Notification (ECN) in TCP. ECN is only |
172 | used when both ends of the TCP flow support it. It is useful to | ||
173 | avoid losses due to congestion (when the bottleneck router supports | ||
174 | ECN). | ||
175 | Possible values are: | ||
176 | 0 disable ECN | ||
177 | 1 ECN enabled | ||
178 | 2 Only server-side ECN enabled. If the other end does | ||
179 | not support ECN, behavior is like with ECN disabled. | ||
180 | Default: 2 | ||
172 | 181 | ||
173 | tcp_fack - BOOLEAN | 182 | tcp_fack - BOOLEAN |
174 | Enable FACK congestion avoidance and fast retransmission. | 183 | Enable FACK congestion avoidance and fast retransmission. |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c96a6bb25430..56dcf97a97fb 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -77,7 +77,7 @@ int sysctl_tcp_window_scaling __read_mostly = 1; | |||
77 | int sysctl_tcp_sack __read_mostly = 1; | 77 | int sysctl_tcp_sack __read_mostly = 1; |
78 | int sysctl_tcp_fack __read_mostly = 1; | 78 | int sysctl_tcp_fack __read_mostly = 1; |
79 | int sysctl_tcp_reordering __read_mostly = TCP_FASTRETRANS_THRESH; | 79 | int sysctl_tcp_reordering __read_mostly = TCP_FASTRETRANS_THRESH; |
80 | int sysctl_tcp_ecn __read_mostly; | 80 | int sysctl_tcp_ecn __read_mostly = 2; |
81 | int sysctl_tcp_dsack __read_mostly = 1; | 81 | int sysctl_tcp_dsack __read_mostly = 1; |
82 | int sysctl_tcp_app_win __read_mostly = 31; | 82 | int sysctl_tcp_app_win __read_mostly = 31; |
83 | int sysctl_tcp_adv_win_scale __read_mostly = 2; | 83 | int sysctl_tcp_adv_win_scale __read_mostly = 2; |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 59aec609cec6..79c39dc9b01c 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -288,7 +288,7 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb) | |||
288 | struct tcp_sock *tp = tcp_sk(sk); | 288 | struct tcp_sock *tp = tcp_sk(sk); |
289 | 289 | ||
290 | tp->ecn_flags = 0; | 290 | tp->ecn_flags = 0; |
291 | if (sysctl_tcp_ecn) { | 291 | if (sysctl_tcp_ecn == 1) { |
292 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE | TCPCB_FLAG_CWR; | 292 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE | TCPCB_FLAG_CWR; |
293 | tp->ecn_flags = TCP_ECN_OK; | 293 | tp->ecn_flags = TCP_ECN_OK; |
294 | } | 294 | } |