Page MenuHomeFreeBSD

tcp: Add PRR cwnd reduction for non-SACK loss
ClosedPublic

Authored by rscheff on Mar 27 2021, 10:58 AM.

Details

Summary

This completes PRR cwnd reduction in all circumstances
for the base stack (SACK loss recovery, ECN window reduction,
non-SACK loss recovery), preventing the arriving ACKs to
clock out new data at the old, too high rate. This
reduces the chance to induce additional losses while
recovering from loss (during congested network conditions).

Overall, the probability to require a lengthy Retransmission
Timeout (currently at a minimum of 240 ms) is reduced,
thereby improving the high-percentile latencies for flow
completion time.

For non-SACK loss recovery, each ACK is assumed to have
one MSS delivered. In order to prevent ACK-split attacks,
where a client could clock out new data indefinitely at
a rate primarily choosen by the client, only one window
worth of ACKs is considered to actually have delivered
new data.

When an ACK is not delivering new data, PRR-CRB is
choosen. This allows PRR to catch up in case of ACK
reordering, but also prevents similar issues with
SACK loss recovery.

MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sys/netinet/tcp_input.c
2697

Are you sure this can never wrap?

3992

Again, can t_dupacks * maxseg never wrap?

  • restricting t_dupacks calculations to not overflow
  • restrict further to a static comparison rather a dynamic

This addresses @jtl's comments.

This revision is now accepted and ready to land.Jun 17 2021, 3:15 PM