[Nfd-dev] [EXT] Trying to use NACK to trigger retransmission

Sirapop Theeranantachai sirapop741 at gmail.com
Mon Jul 17 15:34:07 PDT 2023


Thanks for the advice! That is a spot-on answer. I will try to use a helper
function setexpirytimer (I wasn't aware of this) instead and will let you
know.

Mark

On Mon, Jul 17, 2023, 2:50 PM Junxiao Shi <shijunxiao at arizona.edu> wrote:

> Hi Sirapop
>
> When the incoming Nack pipeline determines that all out-records have
> Nacked, the PIT entry is scheduled to expire "immediately".
> Here, "immediately" means "right after the strategy has been triggered for
> after receive Nack procedure".
> The strategy can still access the PIT entry normally before it returns
> from that procedure.
>
> If the strategy wishes to forward the Interest to an alternate path right
> away, it should do so by invoking the send Interest action before returning
> from the after receive Nack procedure.
> When that happens, the PIT entry expiration is recalculated to accommodate
> the newly created out-record, and the PIT entry would not be deleted
> immediately.
>
> If the strategy wishes to hold onto the PIT entry without immediately
> sending an outgoing Interest, it may invoke the set expiry timer helper
> function (Strategy::setExpiryTimer).
> This is usually used together with another timer set by the strategy
> itself, which allows the strategy to defer the forwarding decision for a
> short while.
>
> Yours, Junxiao
>
> On Mon, Jul 17, 2023 at 4:48 PM Sirapop Theeranantachai via Nfd-dev <
> nfd-dev at lists.cs.ucla.edu> wrote:
>
>> *External Email*
>> Hello
>> I'm implementing a custom forwarding strategy, and would like to handle
>> the incoming NACK to do the followings:
>>
>> 1) Trigger interest transmission to an eligible face
>> 2) If no eligible face, send another NACK to incoming faces from
>> in-records
>> * The link type is point-to-point, so interest going back to the incoming
>> face is not an eligible face.
>>
>> The problem is: forwarder.cpp will expire the PIT entry before passing to
>> the forwarding strategy.
>>
>> In *NFD/daemon/fw/forwader.cpp*, line 479, under *onIncomingNack*
>>
>> https://github.com/named-data/NFD/blob/6bf94c02f511e3197a4e3dd77f0466d0b25d6844/daemon/fw/forwarder.cpp#L479
>>
>> Upon receiving nack, the forwarder.cpp will try to mark the out-record
>> that receives the NACK. If the pit entry has no pending *out-records
>> that are not marked*, the forwarder.cpp will set the expiry timer to be
>> 0ms, and will be removed by the time it receives the data.
>>
>> One solution I tried is to reset the PIT timer, but it requires a
>> callback to an inaccessible method *onInterestFinalize*.
>>
>> I discussed with Lixia and Beichuan about whether removing the PIT when
>> all out-record receives NACK should better be handled in the forwarding
>> strategy? I'm considerably new to the NFD code base, so please let me know
>> if I'm wrong about this. Thank you.
>>
>>   // record Nack on out-record
>>   outRecord->setIncomingNack(nack);
>>
>>   // set PIT expiry timer to now when all out-record receive Nack
>>   if (!fw::hasPendingOutRecords(*pitEntry)) {
>>     this->setExpiryTimer(pitEntry, 0_ms);
>>   }
>>
>>   // trigger strategy: after receive NACK
>>
>> m_strategyChoice.findEffectiveStrategy(*pitEntry).afterReceiveNack(nack,
>> ingress, pitEntry);
>>
>> Mark
>>
>>
>> _______________________________________________
>> Nfd-dev mailing list
>> Nfd-dev at lists.cs.ucla.edu
>> https://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20230717/0185be73/attachment-0001.html>


More information about the Nfd-dev mailing list