Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#47 Problems with TCP-Sack + CWV

open
nobody
ns-2 (62)
5
2009-11-18
2009-11-18
Raffaello Secchi
No

Hello,

I think I spotted a problem with the implementation of TCP Sack in tcp/tcp-sack1.cc.

In function "Sack1TcpAgent::send_much()" the variable "t_seqno" should contain the
sequence number of the packet just transmitted when "process_qoption_after_send()" is
called, similarly to what is done in TcpAgent::send_much(). Otherwise, the function
"process_qoption_after_send()" is called with (t_seqno_ == curseq_) that prevent TCP
congestion window validation (CWV) to be triggered.

I suggest the following patch:

--- tcp-sack1.cc 2009-11-18 21:08:22.000000000 +0000
+++ tcp-sack1.cc.orig 2009-11-18 20:20:23.000000000 +0000
@@ -463,13 +463,12 @@
}
if (found) {
output(xmit_seqno, reason);
- t_seqno_ = xmit_seqno;
+ if (t_seqno_ <= xmit_seqno)
+ t_seqno_ = xmit_seqno + 1;
npacket++;
pipe_++;
if (QOption_)
process_qoption_after_send () ;
- if (t_seqno_ <= xmit_seqno)
- t_seqno_ = xmit_seqno + 1;
if (qs_approved_ == 1) {
double delay = (double) t_rtt_ * tcp_tick_ / cwnd_;
delsnd_timer_.resched(delay);

Regards,

Raffaello

Discussion