<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m using ndnSIM 2.5 with one consumer (n0) plus three other nodes in a line topology, where n3 is the producer. The topology looks like this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">n0 ----- n1 ----- n2 ----- n3<o:p></o:p></p>
<p class="MsoNormal">|<o:p></o:p></p>
<p class="MsoNormal">dummy face<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The consumer node has a ConsumerCbr App installed, requesting 5 Interest/s, from Seq # 0 through 9 (set maxSeq = 10). I also configured the RTO to be of maximum 500 ms and InterestLifetime to be 0.5 s. I purposely make the first Interest
 to not return (by sending it to a dummy face) and later retransmit to n1.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The consumer retrieves Seq # 0 through 8 successfully. The issue is when it sends the first request to Seq #9 to the dummy face at 8.6 s (this request is set to expire at 9.1 s), but the application sends another request at 8.8 s (following
 the 5 Int/s or 1 Int/200 ms rule). This request ends up increasing the “m_seq” count, so when request for Seq # 9 times out at 9.1 s, the method “Consumer::SendPacket()” enters in the control loop on
<a href="http://ndnsim.net/current/doxygen/ndn-consumer_8cpp_source.html#l00176">
Line 176</a> and the application never returns Seq #9.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please find below the logs with comments that explain this behavior.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Shouldn’t the consumer application in this case only send a request if there are pending Interests that are not in flight?<o:p></o:p></p>
<p class="MsoNormal"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you,<o:p></o:p></p>
<p class="MsoNormal">Thiago<o:p></o:p></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0in 0in 1.0pt 0in">
<p class="MsoNormal" style="border:none;padding:0in"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># sequence numbers 0 through 8 are retrieved successfully.<o:p></o:p></p>
<p class="MsoNormal"># here, the consumer retransmits Seq #8 from the dummy face to n1<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 ndn.Consumer:SendPacket()<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 8<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 8 with +8400000000.0ns. already 1 items<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 nfd.Forwarder:onIncomingInterest(): [DEBUG] onIncomingInterest face=259 interest=/ndn/prefix/%FE%08<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 nfd.Forwarder:onContentStoreMiss(): [DEBUG] onContentStoreMiss interest=/ndn/prefix/%FE%08<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 nfd.CustomStrategy:afterReceiveInterest(): [DEBUG] Node Id: 0 Retx Tag is: 1<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 nfd.CustomStrategy:afterReceiveInterest(): [DEBUG] OutFace is: netdev://[00:00:00:00:00:06]<o:p></o:p></p>
<p class="MsoNormal">+8.400000000s 0 nfd.Forwarder:onOutgoingInterest(): [DEBUG] onOutgoingInterest face=257 interest=/ndn/prefix/%FE%08<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># here’s when the Consumer requests Seq #9 to the dummy face, following one Interest every 200 ms<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 ndn.Consumer:SendPacket()<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 ndn.Consumer:SendPacket(): [INFO ] > Interest for 9<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 ndn.Consumer:WillSendOutInterest(): [DEBUG] Trying to add 9 with +8600000000.0ns. already 1 items<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 nfd.Forwarder:onIncomingInterest(): [DEBUG] onIncomingInterest face=259 interest=/ndn/prefix/%FE%09<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 nfd.Forwarder:onContentStoreMiss(): [DEBUG] onContentStoreMiss interest=/ndn/prefix/%FE%09<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 nfd.CustomStrategy:afterReceiveInterest(): [DEBUG] Node Id: 0 Retx Tag is: 0<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 nfd.CustomStrategy:afterReceiveInterest(): [DEBUG] OutFace is: netdev://[00:00:00:00:00:01]<o:p></o:p></p>
<p class="MsoNormal">+8.600000000s 0 nfd.Forwarder:onOutgoingInterest(): [DEBUG] onOutgoingInterest face=256 interest=/ndn/prefix/%FE%09<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># Consumer gets Data for 8<o:p></o:p></p>
<p class="MsoNormal">+8.733265748s 0 nfd.Forwarder:onIncomingData(): [DEBUG] onIncomingData face=257 data=/ndn/prefix/%FE%08<o:p></o:p></p>
<p class="MsoNormal">+8.733265748s 0 nfd.Forwarder:onIncomingData(): [DEBUG] onIncomingData matching=/ndn/prefix/%FE%08<o:p></o:p></p>
<p class="MsoNormal"><span lang="PT-BR">+8.733265748s 0 nfd.Forwarder:onOutgoingData(): [DEBUG] onOutgoingData face=259 data=/ndn/prefix/%FE%08<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PT-BR">+8.733265748s 0 ndn.Consumer:OnData(0x1808630, 0x183b1e0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PT-BR">+8.733265748s 0 ndn.Consumer:OnData(): [INFO ] < DATA for 8<o:p></o:p></span></p>
<p class="MsoNormal">+8.733265748s 0 ndn.Consumer:OnData(): [DEBUG] Hop count: 3<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># Here is where things get interest<o:p></o:p></p>
<p class="MsoNormal"># at 8.8 seconds, the Consumer calls SendPacket, even though Interest for 9 only expires at 9.1s (8.6 + 0.5 ms of RTO)<o:p></o:p></p>
<p class="MsoNormal">+8.800000000s 0 ndn.Consumer:SendPacket()<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># this extra call (above) ends up increasing “m_seq” to 10, which makes the code enter the control statements on
<a href="http://ndnsim.net/current/doxygen/ndn-consumer_8cpp_source.html#l00176">
Line 176</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># at 9.1 s the Interest for 9 times out, as expected<o:p></o:p></p>
<p class="MsoNormal">+9.100000000s 0 nfd.Forwarder:onInterestUnsatisfied(): [DEBUG] onInterestUnsatisfied interest=/ndn/prefix/%FE%09<o:p></o:p></p>
<p class="MsoNormal">+9.100000000s 0 nfd.Forwarder:onInterestFinalize(): [DEBUG] onInterestFinalize interest=/ndn/prefix/%FE%09 unsatisfied<o:p></o:p></p>
<p class="MsoNormal">+9.100000000s -1 ndn.Consumer:OnTimeout(9)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"># Then, this call never gets out and requests continue until the “Simulator::Stop()” is called.<o:p></o:p></p>
<p class="MsoNormal">+9.300000000s -1 ndn.Consumer:SendPacket()<o:p></o:p></p>
<p class="MsoNormal">+9.300000000s -1 ndn.Consumer:SendPacket(): [INFO ] > Interest for 9<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">+9.500000000s -1 ndn.Consumer:SendPacket()<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">+10.000000000s -1 ndn.Consumer:SendPacket()<o:p></o:p></p>
<p class="MsoNormal">+10.000000000s -1 ndn.Consumer:SendPacket(): [INFO ] > Interest for 9<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">+10.200000000s -1 ndn.Consumer:SendPacket()<o:p></o:p></p>
</div>
</body>
</html>