diff options
author | Yuchung Cheng <ycheng@google.com> | 2018-04-17 23:18:48 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-19 13:05:16 -0400 |
commit | e21db6f69a95b846ff04e31fe0a86004cbd000d7 (patch) | |
tree | f162618aee9bba83a0209d3fb1a19f0d519e5df3 /net/ipv4/tcp_input.c | |
parent | a77fa0104abd4348b9ae06ab0afe218ceb2455ea (diff) | |
download | lwn-e21db6f69a95b846ff04e31fe0a86004cbd000d7.tar.gz lwn-e21db6f69a95b846ff04e31fe0a86004cbd000d7.zip |
tcp: track total bytes delivered with ECN CE marks
Introduce a new delivered_ce stat in tcp socket to estimate
number of packets being marked with CE bits. The estimation is
done via ACKs with ECE bit. Depending on the actual receiver
behavior, the estimation could have biases.
Since the TCP sender can't really see the CE bit in the data path,
so the sender is technically counting packets marked delivered with
the "ECE / ECN-Echo" flag set.
With RFC3168 ECN, because the ECE bit is sticky, this count can
drastically overestimate the nummber of CE-marked data packets
With DCTCP-style ECN this should be reasonably precise unless there
is loss in the ACK path, in which case it's not precise.
With AccECN proposal this can be made still more precise, even in
the case some degree of ACK loss.
However this is sender's best estimate of CE information.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 01cce28f90ca..b3bff9c20606 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3503,6 +3503,8 @@ static u32 tcp_newly_delivered(struct sock *sk, u32 prior_delivered, int flag) u32 delivered; delivered = tp->delivered - prior_delivered; + if (flag & FLAG_ECE) + tp->delivered_ce += delivered; return delivered; } |