aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.6/060-tcp-ecn-dont-delay-ACKS-after-CE.patch
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2012-10-23 12:21:34 +0000
committerImre Kaloz <kaloz@openwrt.org>2012-10-23 12:21:34 +0000
commit648f1d01710c2e9d5bb3e296d9553120e5bbe51e (patch)
tree413eb23081ae9b34b54a6ee479e5a2bf0085877d /target/linux/generic/patches-3.6/060-tcp-ecn-dont-delay-ACKS-after-CE.patch
parent35c7b0ba8a06d128adf45ca58377299e988d4e84 (diff)
downloadupstream-648f1d01710c2e9d5bb3e296d9553120e5bbe51e.tar.gz
upstream-648f1d01710c2e9d5bb3e296d9553120e5bbe51e.tar.bz2
upstream-648f1d01710c2e9d5bb3e296d9553120e5bbe51e.zip
[generic]: linux 3.6 support (work in progress)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33897 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.6/060-tcp-ecn-dont-delay-ACKS-after-CE.patch')
-rw-r--r--target/linux/generic/patches-3.6/060-tcp-ecn-dont-delay-ACKS-after-CE.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.6/060-tcp-ecn-dont-delay-ACKS-after-CE.patch b/target/linux/generic/patches-3.6/060-tcp-ecn-dont-delay-ACKS-after-CE.patch
new file mode 100644
index 0000000000..547e4faf73
--- /dev/null
+++ b/target/linux/generic/patches-3.6/060-tcp-ecn-dont-delay-ACKS-after-CE.patch
@@ -0,0 +1,63 @@
+From patchwork Mon Aug 6 21:04:43 2012
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [net-next] tcp: ecn: dont delay ACKS after CE
+Date: Mon, 06 Aug 2012 11:04:43 -0000
+From: Eric Dumazet <eric.dumazet@gmail.com>
+X-Patchwork-Id: 175453
+Message-Id: <1344287083.26674.83.camel@edumazet-glaptop>
+To: David Miller <davem@davemloft.net>
+Cc: netdev <netdev@vger.kernel.org>,
+ Neal Cardwell <ncardwell@google.com>
+
+From: Eric Dumazet <edumazet@google.com>
+
+While playing with CoDel and ECN marking, I discovered a
+non optimal behavior of receiver of CE (Congestion Encountered)
+segments.
+
+In pathological cases, sender has reduced its cwnd to low values,
+and receiver delays its ACK (by 40 ms).
+
+While RFC 3168 6.1.3 (The TCP Receiver) doesn't explicitly recommend
+to send immediate ACKS, we believe its better to not delay ACKS, because
+a CE segment should give same signal than a dropped segment, and its
+quite important to reduce RTT to give ECE/CWR signals as fast as
+possible.
+
+Note we already call tcp_enter_quickack_mode() from TCP_ECN_check_ce()
+if we receive a retransmit, for the same reason.
+
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Neal Cardwell <ncardwell@google.com>
+Acked-by: Neal Cardwell <ncardwell@google.com>
+
+---
+net/ipv4/tcp_input.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+
+
+--
+To unsubscribe from this list: send the line "unsubscribe netdev" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html
+
+diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
+index 2fd2bc9..fa2c2c2 100644
+--- a/net/ipv4/tcp_input.c
++++ b/net/ipv4/tcp_input.c
+@@ -237,7 +237,11 @@ static inline void TCP_ECN_check_ce(struct tcp_sock *tp, const struct sk_buff *s
+ tcp_enter_quickack_mode((struct sock *)tp);
+ break;
+ case INET_ECN_CE:
+- tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
++ if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) {
++ /* Better not delay acks, sender can have a very low cwnd */
++ tcp_enter_quickack_mode((struct sock *)tp);
++ tp->ecn_flags |= TCP_ECN_DEMAND_CWR;
++ }
+ /* fallinto */
+ default:
+ tp->ecn_flags |= TCP_ECN_SEEN;