[Ns-bugs] [Bug 579] TCP congestion window is not updated whent segment size chages

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Mon Jun 29 21:24:43 PDT 2009


http://www.nsnam.org/bugzilla/show_bug.cgi?id=579


Tom Henderson <tomh at tomh.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tomh at tomh.org




--- Comment #4 from Tom Henderson <tomh at tomh.org>  2009-06-30 00:24:43 EDT ---

> void
> TcpSocketImpl::SetSegSize (uint32_t size)
> {
>   m_segmentSize = size;
>   NS_ABORT_MSG_UNLESS (m_state == CLOSED, 
>     "TcpSocketImpl::SetSegSize(): Cannot change segment size dynamically.");
>   m_cWnd = m_initialCWnd * m_segmentSize;
> }
> 
> and 
> 
> void
> TcpSocketImpl::SetInitialCwnd (uint32_t cwnd)
> {
>   m_initialCWnd = cwnd;
>   NS_ABORT_MSG_UNLESS (m_state == CLOSED, 
>     "TcpSocketImpl::SetInitialCwnd(): Cannot change initial cwnd
> dynamically.");
>   m_cWnd = m_initialCWnd * m_segmentSize;
> }
> 
> If we ever teach ns-3 TCP to repect an initial MSS, it will need to do:
> 
>   m_segmentSize = segmentSizeFromSynOption;
>   m_cWnd = m_initialCWnd * m_segmentSize;
> 
> outside of the Attribute setters.  I think this covers all of the bases.
> 
> Does this sound right?  

I agree that this patch is more robust and support checking it now in if it
tests well.  In the future, someone could add the MSS option support, and allow
TCP to set the cwnd to the outbound interface MTU - 40 bytes when the initial
SYN is sent.  But for now, this should solve Pavel's problem.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list