[ndnSIM] can't get Nack when congestion

Alex Afanasyev alexander.afanasyev at ucla.edu
Sat Mar 9 13:14:18 PST 2013


Hi Xiaoke,

I like the idea of creating a separate tag just to track content hops.  We can actually create a two classes derived from the existing FwHopCountTag, one to track Interest hops (including all the NACKing) and one explicitly for ContentObject hops.

I wouldn't do increase by 2, as application can figure out itself that real number of round-trip hops is twice as many as just content object hops (or we can have a helper method for that).

There are several places where new tag needs to be created/updated: ndn-face.cc (somewhere around line 132), ndn-forwarding-strategy.cc (around line 183), and of course in nacks.cc, ndn-consumer.cc, and ndn-producer.cc.

As for the current hopCount tag, there are legitimate cases when you will get odd number.  I can't exactly recall right now what they are, but I think it is related to cached content objects.


Thanks for the help,
Alex


On Mar 8, 2013, at 7:56 PM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:

> Hi Alex,
> 	I would like to try to solve it with second solution. Now here is my design: add a new tag, named TX-tag for content packet, after Interest meets a Content, we add the TX-tag to the content with initial value 0 and the TX increase by 2 every time. What do you think?
> 
> 	And of course, we should let onNack function add the hopCount Tag.
> 
> As to hopCount, is must be an even number, right? bug I get some odd number. The amount is very small, but I do get.
> 
> 
> thanks
> 
> My Regards,
> Xiaoke Jiang (蒋小可)
> 
> Ph.D Candidate,
> Dept. of Computer Science and Technology,
> Tsinghua University, P. R. China
> 
> On Mar 9, 2013, at 3:43 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
> 
>> Hi Xiaoke,
>> 
>> 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.
>> 
>> Let me illustrate with a simple example:
>> 
>> C----R1---X
>>      |
>>      +----R2----P
>> 
>> 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.
>> 
>> 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.
>> 
>> Thanks,
>> Alex
>> 
>> On Mar 8, 2013, at 12:40 AM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>> 
>>> Maybe in OnContentObject, the packet should be checked first, if it is a Nack, call onNack to process it.
>>> 
>>> 
>>> thanks
>>> 
>>> My Regards,
>>> Xiaoke Jiang (蒋小可)
>>> 
>>> Ph.D Candidate,
>>> Dept. of Computer Science and Technology,
>>> Tsinghua University, P. R. China
>>> 
>>> On Mar 8, 2013, at 4:07 PM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>> 
>>>> Hi Alex,
>>>> 
>>>> 
>>>> 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.
>>>> 
>>>> 
>>>>   uint32_t seq = boost::lexical_cast<uint32_t> (contentObject->GetName ().GetComponents ().back ());
>>>>   NS_LOG_INFO ("< DATA for " << seq);
>>>> 
>>>>   int hopCount = -1;
>>>>   FwHopCountTag hopCountTag;
>>>>   if (payload->RemovePacketTag (hopCountTag))
>>>>     {
>>>>       hopCount = hopCountTag.Get ();
>>>>     }
>>>> 
>>>> 
>>>> That's quit strange.
>>>> 
>>>> thanks
>>>> 
>>>> My Regards,
>>>> Xiaoke Jiang (蒋小可)
>>>> 
>>>> Ph.D Candidate,
>>>> Dept. of Computer Science and Technology,
>>>> Tsinghua University, P. R. China
>>>> 
>>>> On Mar 8, 2013, at 11:37 AM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>>> 
>>>>> Hi Alex,
>>>>> 	I add an issue here: https://github.com/NDN-Routing/ndnSIM/issues/26 , but I am not sure it is what you want.
>>>>> 
>>>>> P.S, when do you plan to merge new Rtt Estimator?
>>>>> 
>>>>> 
>>>>> thanks
>>>>> 
>>>>> My Regards,
>>>>> Xiaoke Jiang (蒋小可)
>>>>> 
>>>>> Ph.D Candidate,
>>>>> Dept. of Computer Science and Technology,
>>>>> Tsinghua University, P. R. China
>>>>> 
>>>>> On Mar 8, 2013, at 11:31 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>>>>> 
>>>>>> Hi Xiaoke,
>>>>>> 
>>>>>> 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?  
>>>>>> 
>>>>>> Thanks,
>>>>>> Alex
>>>>>> 
>>>>>> On Mar 7, 2013, at 7:16 PM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>>>>> 
>>>>>>> Hi Alex,
>>>>>>> 	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). 
>>>>>>> 	Is it accurate?
>>>>>>> 
>>>>>>> 
>>>>>>> thanks
>>>>>>> 
>>>>>>> My Regards,
>>>>>>> Xiaoke Jiang (蒋小可)
>>>>>>> 
>>>>>>> Ph.D Candidate,
>>>>>>> Dept. of Computer Science and Technology,
>>>>>>> Tsinghua University, P. R. China
>>>>>>> 
>>>>>>> On Jan 23, 2013, at 1:36 AM, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>>>>>>> 
>>>>>>>> 
>>>>>>>> On Jan 21, 2013, at 11:18 PM, Xiaoke Jiang <shock.jiang at gmail.com> wrote:
>>>>>>>> 
>>>>>>>>> Thank you Alex. Your email really makes sense.
>>>>>>>>> 
>>>>>>>>> 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?
>>>>>>>>> 
>>>>>>>>> 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?
>>>>>>>>> 
>>>>>>>>> FYI,  it's quit strange, because this code is inside OnContent function, but not OnNack.
>>>>>>>> 
>>>>>>>> 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.
>>>>>>>> 
>>>>>>>> The "fix" to preserve hop count in NACKs is trivial.  Less trivial is to count whole transmission and last transmission separately...
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Alex
>>>>>> 
>>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> ndnSIM mailing list
>>> ndnSIM at lists.cs.ucla.edu
>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130309/85673b46/attachment.html>


More information about the ndnSIM mailing list