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

Sirapop Theeranantachai sirapop741 at gmail.com
Mon Jul 17 13:48:12 PDT 2023


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20230717/145e9d10/attachment.html>


More information about the Nfd-dev mailing list