Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit ab97a64

Browse files
nealcardwellxanmod
authored andcommitted
net-tcp_bbr: v2: remove unnecessary rs.delivered_ce logic upon loss
There is no reason to compute rs.delivered_ce upon loss. In fact, we specifically do not want to compute rs.delivered_ce upon loss. Two issues: (1) This would be the wrong thing to do, in behavior terms. With RACK's dynamic reordering window, losses can be marked long after the sequence hole appears in the ACK/SACK stream. We want to to catch the ECN mark rate rising too high as quickly as possible, which means we want to check for high ECN mark rates at ACK time (as BBRv2 currently does) and not loss marking time. (2) This is dead code. The ECN mark rate cannot be detected as too high because the check needs rs->delivered to be > 0 as well: if (rs->delivered_ce > 0 && rs->delivered > 0 && Since we are not setting rs->delivered upon loss, this check cannot succeed, so setting delivered_ce is pointless. This dead and wrong line was discovered by Randall Stewart at Netflix as he was reading the BBRv2 code. Change-Id: I37f83f418a259ec31d8f82de986db071b364b76a Signed-off-by: Alexandre Frade <kernel@xanmod.org>
1 parent 9669039 commit ab97a64

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

net/ipv4/tcp_bbr2.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,6 @@ static void bbr2_skb_marked_lost(struct sock *sk, const struct sk_buff *skb)
25082508
memset(&rs, 0, sizeof(rs));
25092509
rs.tx_in_flight = scb->tx.in_flight;
25102510
rs.lost = tp->lost - scb->tx.lost;
2511-
rs.delivered_ce = tp->delivered_ce - scb->tx.delivered_ce;
25122511
rs.is_app_limited = scb->tx.is_app_limited;
25132512
if (bbr2_is_inflight_too_high(sk, &rs)) {
25142513
rs.tx_in_flight = bbr2_inflight_hi_from_lost_skb(sk, &rs, skb);

0 commit comments

Comments
 (0)