|
Lines 326-332
TcpYeah::GetSsThresh (Ptr<const TcpSocketState> tcb,
|
Link Here
|
|---|
|
| 326 |
NS_LOG_LOGIC ("Not competing with Reno flows upon loss"); |
326 |
NS_LOG_LOGIC ("Not competing with Reno flows upon loss"); |
| 327 |
reduction = m_lastQ; |
327 |
reduction = m_lastQ; |
| 328 |
reduction = std::max (reduction, segBytesInFlight >> m_delta); |
328 |
reduction = std::max (reduction, segBytesInFlight >> m_delta); |
| 329 |
reduction = std::min (reduction, std::max (segBytesInFlight >> 1, (uint32_t) 2)); |
329 |
reduction = std::min (reduction, std::max (segBytesInFlight >> 1, 2U)); |
| 330 |
} |
330 |
} |
| 331 |
else |
331 |
else |
| 332 |
{ // Competing with Reno flows |
332 |
{ // Competing with Reno flows |
|
Lines 339-345
TcpYeah::GetSsThresh (Ptr<const TcpSocketState> tcb,
|
Link Here
|
|---|
|
| 339 |
m_fastCount = 0; |
339 |
m_fastCount = 0; |
| 340 |
m_renoCount = std::max (m_renoCount >> 1, (uint32_t) 2); |
340 |
m_renoCount = std::max (m_renoCount >> 1, (uint32_t) 2); |
| 341 |
|
341 |
|
| 342 |
return (bytesInFlight - (reduction * tcb->m_segmentSize)); |
342 |
// Allow, at least, 2 segment to go out |
|
|
343 |
uint32_t ret = std::max (bytesInFlight - (reduction * tcb->m_segmentSize), |
| 344 |
2U * tcb->m_segmentSize); |
| 345 |
return ret; |
| 343 |
} |
346 |
} |
| 344 |
|
347 |
|
| 345 |
} // namespace ns3 |
348 |
} // namespace ns3 |