📄 test-suite-newreno.tcl
字号:
# With Limited Transmit, without bugfix.Class Test/newreno2_A -superclass TestSuiteTest/newreno2_A instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_A Agent/TCP set singledup_ 1 Agent/TCP set bugFix_ false Agent/TCP/Newreno set newreno_changes1_ 1 set guide_ \ "NewReno, #2A, with Limited Transmit, without bugfix. Bad behavior." $self next pktTraceFile}Test/newreno2_A instproc run {} { global quiet; $self instvar guide_ if {$quiet == "false"} {puts $guide_} $self setup Newreno {24 25 26 28 31 35 40 45 46 47 48 }}# Without Limited Transmit, without bugfix.Class Test/newreno2_A_noLT -superclass TestSuiteTest/newreno2_A_noLT instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_A_noLT Agent/TCP set singledup_ 0 Agent/TCP set bugFix_ false Agent/TCP/Newreno set newreno_changes1_ 1 set guide_ "NewReno, #2A, without Limited Transmit, without bugfix." Test/newreno2_A_noLT instproc run {} [Test/newreno2_A info instbody run ] $self next pktTraceFile}Class Test/newreno2_A_bugfix -superclass TestSuiteTest/newreno2_A_bugfix instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_A_bugfix Agent/TCP set bugFix_ true Agent/TCP/Newreno set newreno_changes1_ 1 set guide_ "NewReno, #2A, with Limited Transmit, with bugfix." Test/newreno2_A_bugfix instproc run {} [Test/newreno2_A info instbody run ] $self next pktTraceFile}Class Test/newreno2_A_bugfix_LC -superclass TestSuiteTest/newreno2_A_bugfix_LC instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_A_bugfix_LC set guide_ "NewReno, #2A, with Limited Transmit, with bugfix." Agent/TCP set bugFix_ true Agent/TCP set lessCareful_ true Agent/TCP/Newreno set newreno_changes1_ 1 Test/newreno2_A_bugfix_LC instproc run {} [Test/newreno2_A info instbody run ] $self next pktTraceFile}# With Limited Transmit, without bugfix.Class Test/newreno2_B -superclass TestSuiteTest/newreno2_B instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_B Agent/TCP set singledup_ 1 Agent/TCP set bugFix_ false Agent/TCP/Newreno set newreno_changes1_ 1 Agent/TCP/Newreno set partial_window_deflation_ 1 Agent/TCP/Newreno set exit_recovery_fix_ 1 set guide_ \ "NewReno, #2B, with Limited Transmit, without bugfix." $self next pktTraceFile}Test/newreno2_B instproc run {} { global quiet; $self instvar guide_ if {$quiet == "false"} {puts $guide_} $self setup Newreno {24 25 26 28 31 35 40 45 46 47 48 }}# Without Limited Transmit, without bugfix.Class Test/newreno2_B_noLT -superclass TestSuiteTest/newreno2_B_noLT instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_B_noLT Agent/TCP set singledup_ 0 Agent/TCP set bugFix_ false Agent/TCP/Newreno set newreno_changes1_ 1 Agent/TCP/Newreno set partial_window_deflation_ 1 Agent/TCP/Newreno set exit_recovery_fix_ 1 set guide_ \ "NewReno, #2B, without Limited Transmit, without bugfix." Test/newreno2_B_noLT instproc run {} [Test/newreno2_B info instbody run ] $self next pktTraceFile}Class Test/newreno2_B_bugfix -superclass TestSuiteTest/newreno2_B_bugfix instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_B_bugfix Agent/TCP set bugFix_ true Agent/TCP/Newreno set newreno_changes1_ 1 Agent/TCP/Newreno set partial_window_deflation_ 1 Agent/TCP/Newreno set exit_recovery_fix_ 1 set guide_ "NewReno, #2B, with Limited Transmit, with bugfix." Test/newreno2_B_bugfix instproc run {} [Test/newreno2_B info instbody run ] $self next pktTraceFile}Class Test/newreno2_B_bugfix_LC -superclass TestSuiteTest/newreno2_B_bugfix_LC instproc init {} { $self instvar net_ test_ guide_ set net_ net4 set test_ newreno2_B_bugfix_LC Agent/TCP set bugFix_ true Agent/TCP set lessCareful_ true Agent/TCP/Newreno set newreno_changes1_ 1 Agent/TCP/Newreno set partial_window_deflation_ 1 Agent/TCP/Newreno set exit_recovery_fix_ 1 set guide_ \ "NewReno, #2B, with Limited Transmit, with Less Careful bugfix." Test/newreno2_B_bugfix_LC instproc run {} [Test/newreno2_B info instbody run ] $self next pktTraceFile}# Class Test/newreno3 -superclass TestSuite# Test/newreno3 instproc init {} {# $self instvar net_ test_ guide_# set net_ net4# set test_ newreno3# $self next pktTraceFile# }# Test/newreno3 instproc run {} {# Agent/TCP set bugFix_ false# $self setup Newreno {24 25 26 28 31 35 40 45 46 47 48 }# }# Class Test/newreno3_bugfix -superclass TestSuite# Test/newreno3_bugfix instproc init {} {# $self instvar net_ test_ guide_# set net_ net4# set test_ newreno3_bugfix# $self next pktTraceFile# }# Test/newreno3_bugfix instproc run {} {# Agent/TCP set bugFix_ true# $self setup Newreno {24 25 26 28 31 35 40 45 46 47 48 }# }# Class Test/newreno4_A -superclass TestSuite# Test/newreno4_A instproc init {} {# $self instvar net_ test_ guide_# set net_ net4# set test_ newreno4_A# $self next pktTraceFile# }# Test/newreno4_A instproc run {} {# Agent/TCP set bugFix_ false# Agent/TCP/Newreno set newreno_changes1_ 1# $self setup Newreno {24 25 26 28 31 35 40 45 46 47 48 }# }# Class Test/newreno4_A_bugfix -superclass TestSuite# Test/newreno4_A_bugfix instproc init {} {# $self instvar net_ test_ guide_# set net_ net4# set test_ newreno4_A_bugfix# $self next pktTraceFile# }# Test/newreno4_A_bugfix instproc run {} {# Agent/TCP set bugFix_ true# Agent/TCP/Newreno set newreno_changes1_ 1# $self setup Newreno {24 25 26 28 31 35 40 45 46 47 48 }# }TestSuite instproc set_lossylink1 {} { $self instvar lossylink1_ ns_ node_ guide_ set lossylink1_ [$ns_ link $node_(s1) $node_(r1)] set em [new ErrorModule Fid] #set errmodel [new ErrorModel/Periodic] #$errmodel unit pkt $lossylink1_ errormodule $em}TestSuite instproc emod1 {} { $self instvar lossylink1_ set errmodule [$lossylink1_ errormodule] return $errmodule }TestSuite instproc drop_pkts1 pkts { $self instvar ns_ set emod [$self emod1] set errmodel1 [new ErrorModel/List] $errmodel1 droplist $pkts $emod insert $errmodel1 $emod bind $errmodel1 1}## With bugfix, there an a single unnecessary Fast Retransmit, and# a single unnecessary retransmission of a window of data.#Class Test/newreno5 -superclass TestSuiteTest/newreno5 instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ newreno5 Agent/TCP set bugFix_ true Agent/TCP set singledup_ 1 set guide_ \ "NewReno #5, reordering, with Limited Transmit, with bugfix." $self next pktTraceFile}Test/newreno5 instproc run {} { global quiet $self instvar guide_ ns_ node_ if {$quiet == "false"} {puts $guide_} ErrorModel set delay_pkt_ true ErrorModel set drop_ false ErrorModel set delay_ 0.05 $self setTopo $self set_lossylink1 $self drop_pkts1 { 25 } $self setup Newreno {100000} 0}##Class Test/sack5 -superclass TestSuiteTest/sack5 instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ sack5 Agent/TCP set bugFix_ true Agent/TCP set singledup_ 1 set guide_ \ "Sack #5, reordering, with Limited Transmit, with bugfix." $self next pktTraceFile}Test/sack5 instproc run {} { global quiet $self instvar guide_ ns_ node_ if {$quiet == "false"} {puts $guide_} ErrorModel set delay_pkt_ true ErrorModel set drop_ false ErrorModel set delay_ 0.05 $self setTopo $self set_lossylink1 $self drop_pkts1 { 25 } $self setup Sack1 {100000} 0}Class Test/newreno5_LC -superclass TestSuiteTest/newreno5_LC instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ newreno5_LC Agent/TCP set bugFix_ true Agent/TCP set lessCareful_ true Agent/TCP set singledup_ 1 set guide_ \ "NewReno #5, reordering, with Limited Transmit, with Less Care. bugfix." Test/newreno5_LC instproc run {} [Test/newreno5 info instbody run ] $self next pktTraceFile}## With bugfix, this looks essentially the same with and without# Limited Transmit (i.e., singledup_ set to 1).#Class Test/newreno5_noLT -superclass TestSuiteTest/newreno5_noLT instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ newreno5_noLT Agent/TCP set bugFix_ true Agent/TCP set singledup_ 0 set guide_ \ "NewReno #5, reordering, without Limited Transmit, with bugfix." Test/newreno5_noLT instproc run {} [Test/newreno5 info instbody run ] $self next pktTraceFile}Class Test/newreno5_noLT_LC -superclass TestSuiteTest/newreno5_noLT_LC instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ newreno5_noLT_LC Agent/TCP set bugFix_ true Agent/TCP set lessCareful_ true Agent/TCP set singledup_ 0 set guide_ \ "NewReno #5, reordering, without Lim. Transmit, with Less Care. bugfix." Test/newreno5_noLT_LC instproc run {} [Test/newreno5 info instbody run ] $self next pktTraceFile}## With Limited Transmit but without bugfix, each unnecessary Fast# Retransmit results in three dup acks, and a subsequent unnecessary# Fast Retransmit.#Class Test/newreno5_noBF -superclass TestSuiteTest/newreno5_noBF instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ newreno5_noBF Agent/TCP set bugFix_ false Agent/TCP set singledup_ 1 set guide_ \ "NewReno #5, reordering, with Limited Transmit, without bugfix. Bad." Test/newreno5_noBF instproc run {} [Test/newreno5 info instbody run ] $self next pktTraceFile}## Without Limited Transmit and without bugfix, each unnecessary Fast# Retransmit results in three dup acks, and a subsequent unnecessary# Fast Retransmit, but the Limited Transmits are there to keep the# number of packets in flight from shrinking below a certain number.# So without Limited Transmit, eventually the congestion window is# reduced to one or two, and the pattern of unnecessary Fast Retransmits# is halted.#Class Test/newreno5_noLT_noBF -superclass TestSuiteTest/newreno5_noLT_noBF instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ newreno5_noLT_noBF Agent/TCP set bugFix_ false Agent/TCP set singledup_ 0 set guide_ \ "NewReno #5, reordering, without Limited Transmit, without bugfix." Test/newreno5_noLT_noBF instproc run {} [Test/newreno5 info instbody run ] $self next pktTraceFile}########################## Now Reno tests:########################### With Reno, there an a single unnecessary Fast Retransmit, but# NO unnecessary retransmission of a window of data.#Class Test/reno5 -superclass TestSuiteTest/reno5 instproc init {} { $self instvar net_ test_ guide_ set net_ net4a set test_ reno5 Agent/TCP set bugFix_ true Agent/TCP set singledup_ 1 set guide_ \ "Reno #5, reordering, with Limited Transmit, with bugfix." $self next pktTraceFile}Test/reno5 instproc run {} { global quiet $self instvar guide_ ns_ node_ if {$quiet == "false"} {puts $guide_} ErrorModel set delay_pkt_ true ErrorModel set drop_ false ErrorModel set delay_ 0.05 $self setTopo $self set_lossylink1 $self drop_pkts1 { 25 } $self setup Reno {100000} 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -