Page MenuHomeFreeBSD

tcp: Add prr_out in preparation for PRR/nonSACK and LRD
ClosedPublic

Authored by rscheff on Mar 4 2021, 2:45 PM.

Details

Summary

With Proportional Rate Reduction (PRR) for SACK, accounting
accuarately for each segment sent during Recovery could
be worked around, by looking at the bytes retransmitted by
SACK and the difference between snd.nxt and recovery point.

However, to deal with Reno (no SACK) loss recovery with
PRR, and for Lost Retransmission Detection, a more reliable
and easier to handle variable is needed.

In order to minimize any hot cacheline churn in the fastpath of
tcp_output(), only tp->t_flags are checked as these are in constant
access and highly likely to be in L1 cache.

Intended to be MFC to stable/13, but not to 13.0 (PRR patches for 13.0
are all in).

Test Plan

Verified that in the SACK LR case and the ECN cwnd reduction cast,
the new prr_out variable shows the identical evolution in comparison
with the prior sack_byted_rexmit + (snd_nxt - snd_recover) calculation.

For non-SACK LR, such a comparison is not possible, and for the
LRD SACK case, duplicate retransmissions would not be accounted
correctly without this change.

Diff Detail

Repository
R10 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

It makes the code more readable
sys/netinet/tcp_input.c
512

style nit

This revision is now accepted and ready to land.Mar 4 2021, 4:03 PM
  • add prr_out in preparation for PRR/nonSACK and LRD
  • fix style nit
This revision now requires review to proceed.Mar 5 2021, 11:36 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 5 2021, 11:43 PM
This revision was automatically updated to reflect the committed changes.