From 385f433a4cdb1ad75d86b922bc1a51e8d415de23 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Thu, 25 Apr 2024 11:42:53 -0700 Subject: [PATCH] netstack: add comments to some TCP sender fields PiperOrigin-RevId: 628142704 --- pkg/tcpip/transport/tcp/snd.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkg/tcpip/transport/tcp/snd.go b/pkg/tcpip/transport/tcp/snd.go index f8d699fe4..bb3999069 100644 --- a/pkg/tcpip/transport/tcp/snd.go +++ b/pkg/tcpip/transport/tcp/snd.go @@ -106,8 +106,16 @@ type sender struct { // window probes. unackZeroWindowProbes uint32 `state:"nosave"` - writeNext *segment - writeList segmentList + // writeNext is the next segment to write that hasn't already been + // written, i.e. the first payload starting at SND.NXT. + writeNext *segment + + // writeList holds all writable data: both unsent data and + // sent-but-unacknowledged data. Alternatively: it holds all bytes + // starting from SND.UNA. + writeList segmentList + + // resendTimer is used for RTOs. resendTimer timer `state:"nosave"` // rtt.TCPRTTState.SRTT and rtt.TCPRTTState.RTTVar are the "smoothed