git: 63803f20f90d - stable/14 - tcp sack: improve computation of delivered_data
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Sep 2025 18:55:48 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=63803f20f90df2afe84932e2a8e6e7556e246004
commit 63803f20f90df2afe84932e2a8e6e7556e246004
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-08-06 10:33:17 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-09-05 18:54:21 +0000
tcp sack: improve computation of delivered_data
delivered_data is the number of bytes, which have newly been
delivered to the peer. This includes the number of bytes
cumulatively acknowledged and selectively acknowledged.
Reviewed by: rscheff
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D51718
(cherry picked from commit 0950ab7d76951ea8e65f25a68511dc809339e802)
---
sys/netinet/tcp_sack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c
index cc02263512da..2672a868ba98 100644
--- a/sys/netinet/tcp_sack.c
+++ b/sys/netinet/tcp_sack.c
@@ -570,6 +570,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
*/
if (SEQ_LT(tp->snd_una, th_ack) && !TAILQ_EMPTY(&tp->snd_holes)) {
left_edge_delta = th_ack - tp->snd_una;
+ delivered_data += left_edge_delta;
sack_blocks[num_sack_blks].start = tp->snd_una;
sack_blocks[num_sack_blks++].end = th_ack;
/*
@@ -577,7 +578,6 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack)
* due to DSACK blocks
*/
if (SEQ_LT(tp->snd_fack, th_ack)) {
- delivered_data += th_ack - tp->snd_una;
tp->snd_fack = th_ack;
sack_changed = SACK_CHANGE;
}