<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Xiaoke,</div><div><br></div><div>Not exactly.  Right now -1 will be returned either for Interests or ContentObject, if the Interest on the way get "bounced" with NACKs at least one.</div><div><br></div><div>Let me illustrate with a simple example:</div><div><br></div><div>C----R1---X</div><div>     |</div><div>     +----R2----P</div><div><br></div><div>C sends an interest and R1 originally forwards it towards X.  X sends out NACK (which is Interest with NACK code in it) back to R1.  At this point, HopCounter tag got destroyed, so when P finally receives the Interest (which will no longer be NACK), this interest will not have HopCounter tag attached, making producer not to include HopCounter tag to the content object.   Finally, when C gets back data, this data will not have a HopCounter tag, and will return -1 for DATA.</div><div><br></div><div>In a simple fix, we should just keep along the original HopCounter tag when Interest-NACKs are getting created in ndn::fw::Nacks (model/fw/nacks.cc).  In a better solution, and I would really appreciate if you can help with implementation, we probably need to count real hops and NACKed hops slightly separately.  For example, there should be counter to track number of hops that data packet followed, number of hops including all NACK returns, and may be something else.</div><div><br></div><div>Thanks,</div><div>Alex</div><br><div><div>On Mar 8, 2013, at 12:40 AM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Maybe in OnContentObject, the packet should be checked first, if it is a Nack, call onNack to process it.<div><br></div><div><br><div>
<div><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Dept. of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, P. R. China</font></span></div></font></div></div>
</div>
<br><div><div>On Mar 8, 2013, at 4:07 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Alex,</div><div><br></div><div><br></div>in Consumer.cc,  in the function OnContentObject, according to your email, it may also process Nack, right? if hopCount = -1, it means the Packet is a Nack, but it still print that the Data is comming.<div><br></div><div><br><div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  uint32_t seq = boost::lexical_cast<uint32_t> (contentObject->GetName ().GetComponents ().back ());</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  NS_LOG_INFO (<span style="color: #3933ff">"< DATA for "</span> << seq);</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; min-height: 15px; "><br></div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  <span style="color: #931a68">int</span> hopCount = -1;</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  FwHopCountTag hopCountTag;</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">  <span style="color: #931a68">if</span> (payload->RemovePacketTag (hopCountTag))</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">    {</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">      hopCount = hopCountTag.Get ();</div><div style="margin: 0px; font-size: 11px; font-family: Monaco; ">    }</div><div><br></div><div><br></div><div>That's quit strange.</div><div><br></div><div apple-content-edited="true">
<div><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; position: static; z-index: auto; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Dept. of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, P. R. China</font></span></div></font></div></div>
</div>
<br><div><div>On Mar 8, 2013, at 11:37 AM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Alex,<div><span class="Apple-tab-span" style="white-space:pre">   </span>I add an issue here: <a href="https://github.com/NDN-Routing/ndnSIM/issues/26">https://github.com/NDN-Routing/ndnSIM/issues/26</a> , but I am not sure it is what you want.</div><div><br></div><div>P.S, when do you plan to merge new Rtt Estimator?</div><div><br></div><div><br><div><div>
<div><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Dept. of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, P. R. China</font></span></div></font></div></div>
</div>
<br><div><div>On Mar 8, 2013, at 11:31 AM, Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Xiaoke,</div><div><br></div><div>Yes. I haven't yet had chance to make the implementation and -1 will mean that somewhere on the way Interest got "NACKed".  Can you open an issue for this on github?  </div><div><br></div><div>Thanks,</div><div>Alex</div><br><div><div>On Mar 7, 2013, at 7:16 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Alex,<div><span class="Apple-tab-span" style="white-space:pre">   </span>I am not sure whether you have improve hop count or not. Now as far as I can understand,  hop count = -1 means Interest got Nack (from provider or middle router). </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Is it accurate?</div><div><br></div><div><br><div>
<div><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="'comic sans ms', sans-serif">thanks</font><br><br><font face="garamond, serif"><font size="4">My Regards,</font><br></font></div><hr align="left" size="1" style="color: rgb(34, 34, 34); font-size: small; font-family: arial; width: 210px; min-height: 1px; "><div style="color: rgb(34, 34, 34); font-size: small; background-color: rgb(255, 255, 255); font-family: arial; "><font face="garamond, serif"><div><span style="font-size: 10.5pt; ">Xiaoke Jiang (蒋小可)</span></div><div><span style="font-size: 10.5pt; "><br></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Ph.D Candidate,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Dept. of Computer Science and Technology,</font></span></div><div><span style="font-size: 10.5pt; "><font color="#666666">Tsinghua University, P. R. China</font></span></div></font></div></div>
</div>
<br><div><div>On Jan 23, 2013, at 1:36 AM, Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 21, 2013, at 11:18 PM, Xiaoke Jiang <<a href="mailto:shock.jiang@gmail.com">shock.jiang@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thank you Alex. Your email really makes sense.<div><br></div><div>I think for a Interest-Nack there is same problem with Interest-Content, hop count for last transmission and hop count for whole transmission(This is quit important, which can measure hop cost of request), what do you think?</div><div><br></div><div>For our trace, there is trace information for those interest who gets its data, in this case, if hopcount=-1, it means a Nack return but not data, is it suitable to not print trace information, RIGHT?</div><div><br></div><div>FYI,  it's quit strange, because this code is inside OnContent function, but not OnNack.</div></div></blockquote><div><br></div><div>There is another thing with hop counting.  It is implemented using packet tags, which means that packets tags in the Interest should be transferred to the Content Object.  With NACKs, these tags are getting lost when NACK is generated, because I didn't consider tags when I originally implemented them.  As a result, as soon as something get nacked, the tag is lost and can't reappear again in ContentObject.</div><div><br></div><div>The "fix" to preserve hop count in NACKs is trivial.  Less trivial is to count whole transmission and last transmission separately...</div><div><br></div><div>--</div><div>Alex</div></div></div></blockquote></div></div></div></blockquote></div><br></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br></blockquote></div><br></body></html>