Skip to content

Commit 6b1d739

Browse files
committed
clarify retransmit-related fields of TcpInfo
Based on https://lore.kernel.org/netdev/CADVnQyn=6wYbVP0m3mepGU23LcEn_BK_TKoSNxVf=TUz9Q+f8g@mail.gmail.com/ Additionally, tcpi_retransmits was reworded for broader audience; I believe new description is correct based on where icsk_retransmits (source of tcpi_retransmits) get reset to 0 in the kernel: - tcp_connect_init() - tcp_ack() - tcp_try_undo_loss() - tcp_rcv_synrecv_state_fastopen()
1 parent a384774 commit 6b1d739

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/inet/nlas.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ pub struct TcpInfo {
476476
/// `TCP_CA_DISORDER`, `TCP_CA_CWR`, `TCP_CA_RECOVERY`,
477477
/// `TCP_CA_LOSS`
478478
pub ca_state: u8,
479-
///
479+
/// Number of retransmits since the last ACK
480480
pub retransmits: u8,
481481
pub probes: u8,
482482
pub backoff: u8,
@@ -506,7 +506,7 @@ pub struct TcpInfo {
506506
pub sacked: u32,
507507
/// Number of segments that have been lost
508508
pub lost: u32,
509-
/// Number of segments that have been retransmitted
509+
/// Number of segments that are currently being retransmitted
510510
pub retrans: u32,
511511
/// Number of segments that have been FACKed
512512
pub fackets: u32,
@@ -538,6 +538,7 @@ pub struct TcpInfo {
538538
pub rcv_rtt: u32,
539539
pub rcv_space: u32,
540540

541+
/// Number of segments that have been retransmitted during lifetime of the socket
541542
pub total_retrans: u32,
542543

543544
pub pacing_rate: u64,

0 commit comments

Comments
 (0)