! Changing suppression logic. We will send interests to faces from which we previously received interests
For now it works only with flooding strategy
diff --git a/model/ccnx-flooding-strategy.cc b/model/ccnx-flooding-strategy.cc
index 5448006..64521b3 100644
--- a/model/ccnx-flooding-strategy.cc
+++ b/model/ccnx-flooding-strategy.cc
@@ -96,11 +96,11 @@
continue; // same face as incoming, don't forward
}
- if (pitEntry.m_incoming.find (metricFace.m_face) != pitEntry.m_incoming.end ())
- {
- NS_LOG_DEBUG ("continue (same as previous incoming)");
- continue; // don't forward to face that we received interest from
- }
+ // if (pitEntry.m_incoming.find (metricFace.m_face) != pitEntry.m_incoming.end ())
+ // {
+ // NS_LOG_DEBUG ("continue (same as previous incoming)");
+ // continue; // don't forward to face that we received interest from
+ // }
CcnxPitEntryOutgoingFaceContainer::type::iterator outgoing =
pitEntry.m_outgoing.find (metricFace.m_face);
diff --git a/model/ccnx-l3-protocol.cc b/model/ccnx-l3-protocol.cc
index 0992810..151436a 100644
--- a/model/ccnx-l3-protocol.cc
+++ b/model/ccnx-l3-protocol.cc
@@ -479,7 +479,7 @@
if (outFace != pitEntry.m_outgoing.end ())
{
- NS_LOG_DEBUG ("Non duplicate interests from the face we have sent interest to");
+ NS_LOG_DEBUG ("Non duplicate interests from the face we have sent interest to. Don't suppress");
// got a non-duplicate interest from the face we have sent interest to
// Probably, there is no point in waiting data from that face... Not sure yet
@@ -492,23 +492,14 @@
ll::bind (&CcnxFibEntry::UpdateStatus,
ll::_1, incomingFace, CcnxFibFaceMetric::NDN_FIB_YELLOW));
}
-
- // if (!isNew &&
- // !isRetransmitted &&
- // pitEntry.AreTherePromisingOutgoingFacesExcept (incomingFace))
- // { // Suppress this interest if we're still expecting data from some other face
- // NS_LOG_DEBUG ("Suppress interests");
- // m_dropInterests (header, SUPPRESSED, incomingFace);
- // return;
- // }
-
- if (!isNew && !isRetransmitted)
- {
- // Suppress this interest if we're still expecting data from some other face
- NS_LOG_DEBUG ("Suppress interests");
- m_dropInterests (header, SUPPRESSED, incomingFace);
- return;
- }
+ else
+ if (!isNew && !isRetransmitted)
+ {
+ // Suppress this interest if we're still expecting data from some other face
+ NS_LOG_DEBUG ("Suppress interests");
+ m_dropInterests (header, SUPPRESSED, incomingFace);
+ return;
+ }
/////////////////////////////////////////////////////////////////////
// Propagate