From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>, Lawrence Brakmo <brakmo@fb.com>,
Andrew Shewmaker <agshew@gmail.com>,
Glenn Judd <glenn.judd@morganstanley.com>,
Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH next] dctcp: update cwnd on congestion event
Date: Mon, 14 Nov 2016 16:42:01 +0100 [thread overview]
Message-ID: <1479138121-32294-1-git-send-email-fw@strlen.de> (raw)
draft-ietf-tcpm-dctcp-02 says:
... when the sender receives an indication of congestion
(ECE), the sender SHOULD update cwnd as follows:
cwnd = cwnd * (1 - DCTCP.Alpha / 2)
So, lets do this and reduce cwnd more smoothly (and faster), as per
current congestion estimate.
Cc: Lawrence Brakmo <brakmo@fb.com>
Cc: Andrew Shewmaker <agshew@gmail.com>
Cc: Glenn Judd <glenn.judd@morganstanley.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
diff --git a/net/ipv4/tcp_dctcp.c b/net/ipv4/tcp_dctcp.c
index ab37c6775630..51139175bf61 100644
--- a/net/ipv4/tcp_dctcp.c
+++ b/net/ipv4/tcp_dctcp.c
@@ -188,8 +188,8 @@ static void dctcp_ce_state_1_to_0(struct sock *sk)
static void dctcp_update_alpha(struct sock *sk, u32 flags)
{
- const struct tcp_sock *tp = tcp_sk(sk);
struct dctcp *ca = inet_csk_ca(sk);
+ struct tcp_sock *tp = tcp_sk(sk);
u32 acked_bytes = tp->snd_una - ca->prior_snd_una;
/* If ack did not advance snd_una, count dupack as MSS size.
@@ -229,6 +229,13 @@ static void dctcp_update_alpha(struct sock *sk, u32 flags)
WRITE_ONCE(ca->dctcp_alpha, alpha);
dctcp_reset(tp, ca);
}
+
+ if (flags & CA_ACK_ECE) {
+ unsigned int cwnd = dctcp_ssthresh(sk);
+
+ if (cwnd != tp->snd_cwnd)
+ tp->snd_cwnd = cwnd;
+ }
}
static void dctcp_state(struct sock *sk, u8 new_state)
--
2.7.3
next reply other threads:[~2016-11-14 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 15:42 Florian Westphal [this message]
2016-11-16 3:02 ` [PATCH next] dctcp: update cwnd on congestion event David Miller
2016-12-02 21:01 ` Neal Cardwell
2016-12-02 21:49 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1479138121-32294-1-git-send-email-fw@strlen.de \
--to=fw@strlen.de \
--cc=agshew@gmail.com \
--cc=brakmo@fb.com \
--cc=daniel@iogearbox.net \
--cc=glenn.judd@morganstanley.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.