Skip to content

Commit

Permalink
[ndnSIM] Fixes for 22.02
Browse files Browse the repository at this point in the history
  • Loading branch information
cawka committed May 5, 2022
1 parent 041be4f commit 361b381
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
11 changes: 4 additions & 7 deletions daemon/fw/forwarder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Forwarder::onIncomingInterest(const Interest& interest, const FaceEndpoint& ingr
}
if (hasDuplicateNonceInPit) {
// goto Interest loop pipeline
this->onInterestLoop(ingress, interest);
this->onInterestLoop(interest, ingress);
m_strategyChoice.findEffectiveStrategy(*pitEntry).afterReceiveLoopedInterest(ingress, interest, *pitEntry);
return;
}
Expand Down Expand Up @@ -344,11 +344,8 @@ Forwarder::onIncomingData(const Data& data, const FaceEndpoint& ingress)
beforeSatisfyInterest(*pitEntry, ingress.face, data);

std::set<std::pair<Face*, EndpointId>> unsatisfiedDownstreams;
this->dispatchToStrategy(*pitEntry,
[&] (fw::Strategy& strategy) {
strategy.satisfyInterest(pitEntry, ingress, data,
satisfiedDownstreams, unsatisfiedDownstreams);
});
m_strategyChoice.findEffectiveStrategy(*pitEntry).satisfyInterest(pitEntry, ingress, data,
satisfiedDownstreams, unsatisfiedDownstreams);
for (const auto& endpoint : unsatisfiedDownstreams) {
unsatisfiedPitEntries.emplace(endpoint, pitEntry);
}
Expand Down Expand Up @@ -399,7 +396,7 @@ Forwarder::onIncomingData(const Data& data, const FaceEndpoint& ingress)
continue;
}

this->onOutgoingData(data, FaceEndpoint(*downstream.first, downstream.second));
this->onOutgoingData(data, *downstream.first);
}
}

Expand Down
2 changes: 1 addition & 1 deletion daemon/fw/forwarder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class Forwarder
*/
signal::Signal<Forwarder, Interest> afterCsMiss;

PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE: // pipelines
/** \brief incoming Interest pipeline
* \param interest the incoming Interest, must be well-formed and created with make_shared
* \param ingress face on which \p interest was received and endpoint of the sender
Expand Down
10 changes: 1 addition & 9 deletions daemon/fw/strategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Strategy::satisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
}

// invoke PIT satisfy callback
beforeSatisfyInterest(pitEntry, ingress, data);
beforeSatisfyInterest(data, ingress, pitEntry);
}


Expand All @@ -202,14 +202,6 @@ Strategy::afterContentStoreHit(const Data& data, const FaceEndpoint& ingress,
this->sendData(data, ingress.face, pitEntry);
}

void
Strategy::beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
const shared_ptr<pit::Entry>& pitEntry)
{
NFD_LOG_DEBUG("beforeSatisfyInterest pitEntry=" << pitEntry->getName()
<< " in=" << ingress << " data=" << data.getName());
}

void
Strategy::afterReceiveData(const Data& data, const FaceEndpoint& ingress,
const shared_ptr<pit::Entry>& pitEntry)
Expand Down
8 changes: 4 additions & 4 deletions daemon/fw/strategy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ class Strategy : noncopyable
* may occur. However, the strategy is allowed to store weak_ptr<pit::Entry>.
*/
virtual void
beforeSatisfyInterest(const shared_ptr<pit::Entry>& pitEntry,
const FaceEndpoint& ingress, const Data& data);
beforeSatisfyInterest(const Data& data, const FaceEndpoint& ingress,
const shared_ptr<pit::Entry>& pitEntry);


virtual void
Expand All @@ -195,8 +195,8 @@ class Strategy : noncopyable
* In the base class this method sends \p data to \p ingress
*/
virtual void
afterContentStoreHit(const shared_ptr<pit::Entry>& pitEntry,
const FaceEndpoint& ingress, const Data& data);
afterContentStoreHit(const Data& data, const FaceEndpoint& ingress,
const shared_ptr<pit::Entry>& pitEntry);

/** \brief trigger after Data is received
*
Expand Down

0 comments on commit 361b381

Please sign in to comment.