diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp index 7695095e..2373c69e 100644 --- a/daemon/fw/asf-strategy.cpp +++ b/daemon/fw/asf-strategy.cpp @@ -34,6 +34,7 @@ NFD_REGISTER_STRATEGY(AsfStrategy); AsfStrategy::AsfStrategy(Forwarder& forwarder, const Name& name) : Strategy(forwarder) + , ProcessNackTraits(this) , m_measurements(getMeasurements()) , m_probing(m_measurements) { @@ -167,6 +168,7 @@ AsfStrategy::afterReceiveNack(const lp::Nack& nack, const FaceEndpoint& ingress, { NFD_LOG_NACK_FROM(nack, ingress, ""); onTimeoutOrNack(pitEntry->getName(), ingress.face.getId(), true); + this->processNack(nack, ingress.face, pitEntry); } pit::OutRecord* diff --git a/daemon/fw/asf-strategy.hpp b/daemon/fw/asf-strategy.hpp index b3d73967..4607d4e2 100644 --- a/daemon/fw/asf-strategy.hpp +++ b/daemon/fw/asf-strategy.hpp @@ -1,6 +1,6 @@ /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* - * Copyright (c) 2014-2022, Regents of the University of California, + * Copyright (c) 2014-2024, Regents of the University of California, * Arizona Board of Regents, * Colorado State University, * University Pierre & Marie Curie, Sorbonne University, @@ -29,6 +29,7 @@ #include "strategy.hpp" #include "asf-measurements.hpp" #include "asf-probing-module.hpp" +#include "process-nack-traits.hpp" #include "retx-suppression-exponential.hpp" namespace nfd::fw { @@ -42,7 +43,7 @@ namespace asf { * with a Smart Forwarding Plane in NDN", NDN Technical Report NDN-0042, 2016. * https://named-data.net/publications/techreports/ndn-0042-1-asf/ */ -class AsfStrategy : public Strategy +class AsfStrategy : public Strategy, public ProcessNackTraits { public: explicit @@ -91,6 +92,8 @@ class AsfStrategy : public Strategy std::unique_ptr m_retxSuppression; ProbingModule m_probing; size_t m_nMaxTimeouts = 3; + + friend ProcessNackTraits; }; } // namespace asf diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp index e7ed117f..725fd701 100644 --- a/tests/daemon/fw/strategy-nack-return.t.cpp +++ b/tests/daemon/fw/strategy-nack-return.t.cpp @@ -28,6 +28,7 @@ */ // Strategies implementing recommended Nack processing procedure, sorted alphabetically. +#include "fw/asf-strategy.hpp" #include "fw/best-route-strategy.hpp" #include "fw/random-strategy.hpp" @@ -84,6 +85,7 @@ BOOST_AUTO_TEST_SUITE(Fw) BOOST_AUTO_TEST_SUITE(TestStrategyNackReturn) using Strategies = boost::mp11::mp_list< + AsfStrategy, BestRouteStrategy, RandomStrategy >; diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp index 8bd96d10..2c8dd626 100644 --- a/tests/daemon/fw/strategy-scope-control.t.cpp +++ b/tests/daemon/fw/strategy-scope-control.t.cpp @@ -95,7 +95,7 @@ struct Test using Tests = boost::mp11::mp_list< Test, - Test, + Test, Test, Test, Test