tcp (fixes #580): Adjust the pacing rate in TcpBbr

This commit is contained in:
Zili Meng
2024-05-24 11:20:04 +05:30
committed by Tom Henderson
parent d88e7f1eb4
commit 99e521d4be
2 changed files with 3 additions and 0 deletions

View File

@@ -220,6 +220,7 @@ TcpBbr::SetPacingRate(Ptr<TcpSocketState> tcb, double gain)
{
NS_LOG_FUNCTION(this << tcb << gain);
DataRate rate(gain * m_maxBwFilter.GetBest().GetBitRate());
rate *= (1.f - m_pacingMargin);
rate = std::min(rate, tcb->m_maxPacingRate);
if (!m_hasSeenRtt && tcb->m_minRtt != Time::Max())

View File

@@ -402,6 +402,8 @@ class TcpBbr : public TcpCongestionOps
Time m_ackEpochTime{Seconds(0)}; //!< Starting of ACK sampling epoch time
uint32_t m_ackEpochAcked{0}; //!< Bytes ACked in sampling epoch
bool m_hasSeenRtt{false}; //!< Have we seen RTT sample yet?
double m_pacingMargin{0.01}; //!< BBR intentionally reduces the pacing rate by 1% to drain any
//!< standing queues. See `bbr_rate_bytes_per_sec` in Linux.
};
} // namespace ns3