<div dir="ltr"><div>Hello</div><div>I'm implementing a custom forwarding strategy, and would like to handle the incoming NACK to do the followings:</div><div><br></div><div>1)
Trigger interest transmission to an eligible face
</div><div>2) If no eligible face, send another NACK to incoming faces from in-records</div><div>* The link type is point-to-point, so interest going back to the incoming face is not an eligible face.<br></div><div><br></div><div>The problem is: forwarder.cpp will expire the PIT entry before passing to the forwarding strategy.</div><div><br></div><div>In <b>NFD/daemon/fw/forwader.cpp</b>, line 479, under <b>onIncomingNack</b><br></div><div><a href="https://github.com/named-data/NFD/blob/6bf94c02f511e3197a4e3dd77f0466d0b25d6844/daemon/fw/forwarder.cpp#L479">https://github.com/named-data/NFD/blob/6bf94c02f511e3197a4e3dd77f0466d0b25d6844/daemon/fw/forwarder.cpp#L479</a></div><div><span style="font-family:monospace"><br></span></div><div>Upon receiving nack, the forwarder.cpp will try to mark the out-record that receives the NACK. If the pit entry has no pending <b>out-records that are not marked</b>, the forwarder.cpp will set the expiry timer to be 0ms, and will be removed by the time it receives the data.<br></div><div><br></div><div>One solution I tried is to reset the PIT timer, but it requires a callback to an inaccessible method <i>onInterestFinalize</i>.</div><div><br></div><div>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.<br></div><div><br></div><div><div><div><div><span style="font-family:monospace"> // record Nack on out-record<br> outRecord->setIncomingNack(nack);<br><br> // set PIT expiry timer to now when all out-record receive Nack<br> if (!fw::hasPendingOutRecords(*pitEntry)) {<br> this->setExpiryTimer(pitEntry, 0_ms);<br> }<br><br> // trigger strategy: after receive NACK<br> m_strategyChoice.findEffectiveStrategy(*pitEntry).afterReceiveNack(nack, ingress, pitEntry);</span></div><div><br></div><div>Mark<br></div><div><br></div><div><br></div></div></div></div></div>