Vivek-anand-jain / ns-3-dev-git

Experimental GitHub read-only mirror of ns-3 development repository, will be kept in sync with original Mercurial repository; pull requests not accepted at the moment.
http://www.nsnam.org/
GNU General Public License v2.0
5 stars 6 forks source link

Fixed 2 Bugs #3

Closed MengleiZhang closed 6 years ago

MengleiZhang commented 6 years ago

Hi Vivek,

I was using this BBR implementation, and spot 2 bugs. Can you check it.

  1. In the TcpTxBuffer class, the m_priorDelivered parameter of struct RateSample should be initialized to 0. The original line 44 uint32_t m_priorDelivered; //!< The delivered count of the most recent packet delivered should be changed to uint32_t m_priorDelivered = 0; //!< The delivered count of the most recent packet delivered

  2. In the TcpBbr::ModulateCwndForRecovery() function line 429 tcb->m_cWnd = std::max (tcb->m_cWnd.Get () - rs->m_packetLoss, tcb->m_segmentSize); should change be to tcb->m_cWnd = std::max ((int)tcb->m_cWnd.Get () - (int)rs->m_packetLoss, (int)tcb->m_segmentSize);

Vivek-anand-jain commented 6 years ago

Hi Menglei,

Thanks for pointing this.

For 1, Though it is not a bug, I will initialize all other variables in RateSample too.

For 2, I'll incorporate suggested changes and see if there are many more like this.

I look forward for more suggestions.