[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ns] patch: tcp.cc slow-start bug ?



Ok, this was a bit to simple.
A better try:


	tcp.cc

	void TcpAgent::send_much(int force, int reason, int maxburst)
	{
	   send_idle_helper();
	   int win = window();
	   int npackets = 0;
	   if (!force && delsnd_timer_.status() == TIMER_PENDING)
	      return;
	   /* Save time when first packet was sent, for newreno  --Allman */
	   if (t_seqno_ == 0)
	      firstsent_ = Scheduler::instance().clock();
	   if (burstsnd_timer_.status() == TIMER_PENDING)
	      return;
	+   int i=0;
	+   while ( t_seqno_ <= highest_ack_+wnd_ &&  i< win && t_seqno_ < curseq_)
	-   while (t_seqno_ <= highest_ack_ + win && t_seqno_ < curseq_)
	   {
	+      i++;
	      if (overhead_ == 0 || force)


--
Free Dmitry Sklyarov ! 
http://www.freesklyarov.org