<div dir="ltr"><div>Hi Andre</div><div><br></div><div>I don't see congestion control in this snippet.</div><div>Applications are required to implement congestion control in order to operate smoothly in an NDN network.<br></div><div><br></div><div>Yours, Junxiao<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 26, 2021 at 8:45 PM Andre <<a href="mailto:adcarneiro@inf.ufrgs.br">adcarneiro@inf.ufrgs.br</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>Inside delayedInterest, the variable nPackets is determined
      according to the 8000 byte payload limit.<br>
    
    <div style="color:rgb(246,246,244);background-color:rgb(40,42,54);font-family:"source code pro","Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:15px;line-height:20px;white-space:pre-wrap"><div><span style="color:rgb(123,127,139)">// Express interest for all packets</span></div><div><span style="color:rgb(246,246,244)">   </span><span style="color:rgb(242,134,196)">for</span><span style="color:rgb(246,246,244)"> (i </span><span style="color:rgb(242,134,196)">=</span><span style="color:rgb(246,246,244)"> </span><span style="color:rgb(191,158,238)">0</span><span style="color:rgb(246,246,244)">; i </span><span style="color:rgb(242,134,196)"><</span><span style="color:rgb(246,246,244)"> nPackets; i</span><span style="color:rgb(242,134,196)">++</span><span style="color:rgb(246,246,244)">){</span></div>
<div><span style="color:rgb(246,246,244)">      </span><span style="color:rgb(242,134,196)">if</span><span style="color:rgb(246,246,244)"> ((bHasLeftover) </span><span style="color:rgb(242,134,196)">&&</span><span style="color:rgb(246,246,244)"> (i</span><span style="color:rgb(242,134,196)">+</span><span style="color:rgb(191,158,238)">1</span><span style="color:rgb(246,246,244)"> </span><span style="color:rgb(242,134,196)">==</span><span style="color:rgb(246,246,244)"> nPackets)){</span></div><div><span style="color:rgb(123,127,139)">         // Last packet</span></div><div><span style="color:rgb(246,246,244)">         nPacketPayload </span><span style="color:rgb(242,134,196)">=</span><span style="color:rgb(246,246,244)"> dataBuff.nPayload </span><span style="color:rgb(242,134,196)">%</span><span style="color:rgb(246,246,244)"> N_MAX_PACKET_BYTES;</span></div><div><span style="color:rgb(246,246,244)">      }</span></div><div><span style="color:rgb(246,246,244)">      </span><span style="color:rgb(242,134,196)">else</span><span style="color:rgb(246,246,244)">{</span></div><div><span style="color:rgb(123,127,139)">         // Any other packet</span></div><div><span style="color:rgb(246,246,244)">         nPacketPayload </span><span style="color:rgb(242,134,196)">=</span><span style="color:rgb(246,246,244)"> N_MAX_PACKET_BYTES;</span></div><div><span style="color:rgb(246,246,244)">      }</span></div>
<div><span style="color:rgb(246,246,244)">      </span><span style="color:rgb(98,232,132)">snprintf</span><span style="color:rgb(246,246,244)">(strBuf, </span><span style="color:rgb(242,134,196)">sizeof</span><span style="color:rgb(246,246,244)">(strBuf), </span><span style="color:rgb(222,228,146)">"</span><span style="color:rgb(191,158,238)">%s</span><span style="color:rgb(231,238,152)">-</span><span style="color:rgb(191,158,238)">%d</span><span style="color:rgb(231,238,152)">b-</span><span style="color:rgb(191,158,238)">%d</span><span style="color:rgb(231,238,152)">of</span><span style="color:rgb(191,158,238)">%d</span><span style="color:rgb(222,228,146)">"</span><span style="color:rgb(246,246,244)">, strPrefix, nPacketPayload, i</span><span style="color:rgb(242,134,196)">+</span><span style="color:rgb(191,158,238)">1</span><span style="color:rgb(246,246,244)">, nPackets);</span></div><div><span style="color:rgb(246,246,244)">      </span><span style="color:rgb(98,232,132)">fprintf</span><span style="color:rgb(246,246,244)">(stdout, </span><span style="color:rgb(222,228,146)">"</span><span style="color:rgb(231,238,152)">[Consumer::delayedInterest] Expressing interest=</span><span style="color:rgb(191,158,238)">%s</span><span style="color:rgb(231,238,152)"> (</span><span style="color:rgb(191,158,238)">%d</span><span style="color:rgb(231,238,152)">/</span><span style="color:rgb(191,158,238)">%d</span><span style="color:rgb(231,238,152)">)</span><span style="color:rgb(242,134,196)">\n</span><span style="color:rgb(222,228,146)">"</span><span style="color:rgb(246,246,244)">, strBuf, i</span><span style="color:rgb(242,134,196)">+</span><span style="color:rgb(191,158,238)">1</span><span style="color:rgb(246,246,244)">, nPackets);</span></div>
<div><span style="color:rgb(246,246,244)">      dtBegin </span><span style="color:rgb(242,134,196)">=</span><span style="color:rgb(246,246,244)"> std</span><span style="color:rgb(242,134,196)">::</span><span style="color:rgb(246,246,244)">chrono</span><span style="color:rgb(242,134,196)">::</span><span style="color:rgb(246,246,244)">steady_clock</span><span style="color:rgb(242,134,196)">::</span><span style="color:rgb(98,232,132)">now</span><span style="color:rgb(246,246,244)">();</span></div><div><span style="color:rgb(246,246,244)">      interestName </span><span style="color:rgb(242,134,196)">=</span><span style="color:rgb(246,246,244)"> </span><span style="color:rgb(98,232,132)">Name</span><span style="color:rgb(246,246,244)">(strBuf);</span></div><div><span style="color:rgb(246,246,244)">      interest     </span><span style="color:rgb(242,134,196)">=</span><span style="color:rgb(246,246,244)"> </span><span style="color:rgb(98,232,132)">Interest</span><span style="color:rgb(246,246,244)">(interestName);</span></div><div><span style="color:rgb(246,246,244)">      interest.</span><span style="color:rgb(98,232,132)">setCanBePrefix</span><span style="color:rgb(246,246,244)">(</span><span style="color:rgb(191,158,238)">false</span><span style="color:rgb(246,246,244)">);</span></div><div><span style="color:rgb(246,246,244)">      interest.</span><span style="color:rgb(98,232,132)">setMustBeFresh</span><span style="color:rgb(246,246,244)">(</span><span style="color:rgb(191,158,238)">true</span><span style="color:rgb(246,246,244)">);</span></div><div><span style="color:rgb(246,246,244)">      interest.</span><span style="color:rgb(98,232,132)">setInterestLifetime</span><span style="color:rgb(246,246,244)">(</span><span style="color:rgb(191,158,238)">6</span><span style="color:rgb(242,134,196)">_s</span><span style="color:rgb(246,246,244)">);</span></div>
<div><span style="color:rgb(246,246,244)">      m_face.</span><span style="color:rgb(98,232,132)">expressInterest</span><span style="color:rgb(246,246,244)">(interest,</span></div><div><span style="color:rgb(246,246,244)">                           </span><span style="color:rgb(98,232,132)">bind</span><span style="color:rgb(246,246,244)">(</span><span style="color:rgb(242,134,196)">&</span><span style="color:rgb(246,246,244)">Consumer</span><span style="color:rgb(242,134,196)">::</span><span style="color:rgb(246,246,244)">onData, </span><span style="color:rgb(191,158,238);font-style:italic">this</span><span style="color:rgb(246,246,244)">, _1, _2, dtBegin),</span></div><div><span style="color:rgb(246,246,244)">                           </span><span style="color:rgb(98,232,132)">bind</span><span style="color:rgb(246,246,244)">(</span><span style="color:rgb(242,134,196)">&</span><span style="color:rgb(246,246,244)">Consumer</span><span style="color:rgb(242,134,196)">::</span><span style="color:rgb(246,246,244)">onNack, </span><span style="color:rgb(191,158,238);font-style:italic">this</span><span style="color:rgb(246,246,244)">, _1, _2, dtBegin),</span></div><div><span style="color:rgb(246,246,244)">                           </span><span style="color:rgb(98,232,132)">bind</span><span style="color:rgb(246,246,244)">(</span><span style="color:rgb(242,134,196)">&</span><span style="color:rgb(246,246,244)">Consumer</span><span style="color:rgb(242,134,196)">::</span><span style="color:rgb(246,246,244)">onTimeout, </span><span style="color:rgb(191,158,238);font-style:italic">this</span><span style="color:rgb(246,246,244)">, _1, dtBegin));</span></div><div><span style="color:rgb(246,246,244)">   }</span></div></div>
    <p><br>
    </p>
    <p>This runs fine for small requests, but when more interests are
      expressed in a row, making requests of about 60 to 100 8KB
      packages, the producers work for a while but then start becoming
      unresponsive. Once I get a timeout from a specific producer, it
      does not answer to any more requests, even if I kill the
      producer/consumer process and start them back up.</p></div>

</blockquote></div></div>