tcp: (merges !2083) Consider segmentSize send limit while checking for cwnd rate-limit

This commit is contained in:
Ghostyhands
2024-07-28 19:18:27 +00:00
committed by Tom Henderson
parent 583733a3bd
commit 209c593a00

View File

@@ -3259,7 +3259,8 @@ TcpSocketBase::SendDataPacket(SequenceNumber32 seq, uint32_t maxSize, bool withA
// This is a simple version of Linux tcp_cwnd_validate() but following
// the principle implemented in Linux that limits the updating of cwnd
// (in the congestion controls) when flight size is >= cwnd
m_tcb->m_isCwndLimited = (BytesInFlight() >= m_tcb->m_cWnd);
// send will also be cwnd limited if less then one segment of cwnd is available
m_tcb->m_isCwndLimited = (m_tcb->m_cWnd < BytesInFlight() + m_tcb->m_segmentSize);
UpdateRttHistory(seq, sz, isRetransmission);