Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 2 | /* |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame^] | 3 | * Copyright (c) 2014-2022, Regents of the University of California, |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 4 | * Arizona Board of Regents, |
| 5 | * Colorado State University, |
| 6 | * University Pierre & Marie Curie, Sorbonne University, |
| 7 | * Washington University in St. Louis, |
| 8 | * Beijing Institute of Technology, |
| 9 | * The University of Memphis. |
| 10 | * |
| 11 | * This file is part of NFD (Named Data Networking Forwarding Daemon). |
| 12 | * See AUTHORS.md for complete list of NFD authors and contributors. |
| 13 | * |
| 14 | * NFD is free software: you can redistribute it and/or modify it under the terms |
| 15 | * of the GNU General Public License as published by the Free Software Foundation, |
| 16 | * either version 3 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 19 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 20 | * PURPOSE. See the GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License along with |
| 23 | * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 24 | */ |
| 25 | |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 26 | #include "fw/strategy.hpp" |
Junxiao Shi | a788e25 | 2015-01-28 17:06:25 -0700 | [diff] [blame] | 27 | #include "fw/retx-suppression-fixed.hpp" |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 28 | #include "fw/retx-suppression-exponential.hpp" |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 29 | |
| 30 | #include "tests/test-common.hpp" |
Davide Pesavento | cf7db2f | 2019-03-24 23:17:28 -0400 | [diff] [blame] | 31 | #include "tests/daemon/global-io-fixture.hpp" |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 32 | #include "tests/daemon/face/dummy-face.hpp" |
| 33 | |
| 34 | namespace nfd { |
Spyridon Mastorakis | d0381c0 | 2015-02-19 10:29:41 -0800 | [diff] [blame] | 35 | namespace fw { |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 36 | namespace tests { |
| 37 | |
Spyridon Mastorakis | d0381c0 | 2015-02-19 10:29:41 -0800 | [diff] [blame] | 38 | using namespace nfd::tests; |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 39 | |
Davide Pesavento | 97210d5 | 2016-10-14 15:45:48 +0200 | [diff] [blame] | 40 | BOOST_AUTO_TEST_SUITE(Fw) |
Davide Pesavento | cf7db2f | 2019-03-24 23:17:28 -0400 | [diff] [blame] | 41 | BOOST_FIXTURE_TEST_SUITE(TestRetxSuppression, GlobalIoTimeFixture) |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 42 | |
Junxiao Shi | a788e25 | 2015-01-28 17:06:25 -0700 | [diff] [blame] | 43 | BOOST_AUTO_TEST_CASE(Fixed) |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 44 | { |
Davide Pesavento | a4abfb0 | 2019-10-06 16:02:56 -0400 | [diff] [blame] | 45 | FaceTable faceTable; |
| 46 | Forwarder forwarder(faceTable); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 47 | Pit& pit = forwarder.getPit(); |
Junxiao Shi | a788e25 | 2015-01-28 17:06:25 -0700 | [diff] [blame] | 48 | static const time::milliseconds MIN_RETX_INTERVAL(200); |
| 49 | RetxSuppressionFixed rs(MIN_RETX_INTERVAL); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 50 | |
| 51 | shared_ptr<DummyFace> face1 = make_shared<DummyFace>(); |
| 52 | shared_ptr<DummyFace> face2 = make_shared<DummyFace>(); |
| 53 | shared_ptr<DummyFace> face3 = make_shared<DummyFace>(); |
Davide Pesavento | a4abfb0 | 2019-10-06 16:02:56 -0400 | [diff] [blame] | 54 | faceTable.add(face1); |
| 55 | faceTable.add(face2); |
| 56 | faceTable.add(face3); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 57 | |
| 58 | shared_ptr<Interest> interest = makeInterest("ndn:/0JiimvmxK8"); |
| 59 | shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first; |
| 60 | |
Junxiao Shi | a788e25 | 2015-01-28 17:06:25 -0700 | [diff] [blame] | 61 | const time::nanoseconds RETRANSMISSION_10P = |
| 62 | time::duration_cast<time::nanoseconds>(MIN_RETX_INTERVAL * 0.1); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 63 | |
| 64 | // @ time 0 |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 65 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 66 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::NEW); |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 67 | pitEntry->insertOrUpdateOutRecord(*face3, *interest); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 68 | |
| 69 | this->advanceClocks(RETRANSMISSION_10P, 5); // @ time 0.5 interval |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 70 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 71 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 72 | pitEntry->insertOrUpdateInRecord(*face2, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 73 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 74 | |
| 75 | this->advanceClocks(RETRANSMISSION_10P, 6); // @ time 1.1 interval |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 76 | pitEntry->insertOrUpdateInRecord(*face2, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 77 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 78 | // but strategy decides not to forward |
| 79 | |
| 80 | this->advanceClocks(RETRANSMISSION_10P, 1); // @ time 1.2 interval |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 81 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 82 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 83 | // retransmission suppress shall still give clearance for forwarding |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 84 | pitEntry->insertOrUpdateOutRecord(*face3, *interest); // and strategy forwards |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 85 | |
| 86 | this->advanceClocks(RETRANSMISSION_10P, 2); // @ time 1.4 interval |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 87 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 88 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 89 | pitEntry->insertOrUpdateInRecord(*face2, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 90 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 91 | } |
| 92 | |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 93 | BOOST_AUTO_TEST_CASE(Exponential) |
| 94 | { |
Davide Pesavento | a4abfb0 | 2019-10-06 16:02:56 -0400 | [diff] [blame] | 95 | FaceTable faceTable; |
| 96 | Forwarder forwarder(faceTable); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 97 | Pit& pit = forwarder.getPit(); |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame^] | 98 | RetxSuppressionExponential rs(10_ms, 100_ms, 3.0); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 99 | |
| 100 | shared_ptr<DummyFace> face1 = make_shared<DummyFace>(); |
| 101 | shared_ptr<DummyFace> face2 = make_shared<DummyFace>(); |
Davide Pesavento | a4abfb0 | 2019-10-06 16:02:56 -0400 | [diff] [blame] | 102 | faceTable.add(face1); |
| 103 | faceTable.add(face2); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 104 | |
| 105 | shared_ptr<Interest> interest = makeInterest("ndn:/smuVeQSW6q"); |
| 106 | shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first; |
| 107 | |
| 108 | // @ 0ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 109 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 110 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::NEW); |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 111 | pitEntry->insertOrUpdateOutRecord(*face2, *interest); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 112 | // suppression interval is 10ms, until 10ms |
| 113 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 114 | this->advanceClocks(5_ms); // @ 5ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 115 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 116 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 117 | // suppression interval is 10ms, until 10ms |
| 118 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 119 | this->advanceClocks(6_ms); // @ 11ms |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 120 | // note: what happens at *exactly* 10ms does not matter so it's untested, |
| 121 | // because in reality network timing won't be exact: |
| 122 | // incoming Interest is processed either before or after 10ms point |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 123 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 124 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD); |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 125 | pitEntry->insertOrUpdateOutRecord(*face2, *interest); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 126 | // suppression interval is 30ms, until 41ms |
| 127 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 128 | this->advanceClocks(25_ms); // @ 36ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 129 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 130 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 131 | // suppression interval is 30ms, until 41ms |
| 132 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 133 | this->advanceClocks(6_ms); // @ 42ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 134 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 135 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 136 | // strategy decides not to forward, but suppression interval is increased nevertheless |
| 137 | // suppression interval is 90ms, until 101ms |
| 138 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 139 | this->advanceClocks(58_ms); // @ 100ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 140 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 141 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 142 | // suppression interval is 90ms, until 101ms |
| 143 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 144 | this->advanceClocks(3_ms); // @ 103ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 145 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 146 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD); |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 147 | pitEntry->insertOrUpdateOutRecord(*face2, *interest); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 148 | // suppression interval is 100ms, until 203ms |
| 149 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 150 | this->advanceClocks(99_ms); // @ 202ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 151 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 152 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::SUPPRESS); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 153 | // suppression interval is 100ms, until 203ms |
| 154 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 155 | this->advanceClocks(2_ms); // @ 204ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 156 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 157 | BOOST_CHECK(rs.decidePerPitEntry(*pitEntry) == RetxSuppressionResult::FORWARD); |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 158 | pitEntry->insertOrUpdateOutRecord(*face2, *interest); |
Junxiao Shi | 73b909a | 2015-02-08 21:31:42 -0700 | [diff] [blame] | 159 | // suppression interval is 100ms, until 304ms |
| 160 | } |
| 161 | |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 162 | BOOST_AUTO_TEST_CASE(ExponentialPerUpstream) |
| 163 | { |
Davide Pesavento | a4abfb0 | 2019-10-06 16:02:56 -0400 | [diff] [blame] | 164 | FaceTable faceTable; |
| 165 | Forwarder forwarder(faceTable); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 166 | Pit& pit = forwarder.getPit(); |
Ashlesh Gawande | 1ef93d0 | 2022-04-08 00:25:06 -0400 | [diff] [blame^] | 167 | RetxSuppressionExponential rs(10_ms, 100_ms, 3.0); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 168 | |
| 169 | shared_ptr<DummyFace> face1 = make_shared<DummyFace>(); |
| 170 | shared_ptr<DummyFace> face2 = make_shared<DummyFace>(); |
Davide Pesavento | a4abfb0 | 2019-10-06 16:02:56 -0400 | [diff] [blame] | 171 | faceTable.add(face1); |
| 172 | faceTable.add(face2); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 173 | |
| 174 | shared_ptr<Interest> interest = makeInterest("ndn:/covfefeW6q"); |
| 175 | shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first; |
| 176 | |
| 177 | // @ 0ms |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 178 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 179 | BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::NEW); |
| 180 | |
| 181 | // Simluate forwarding an interest to face2 |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 182 | pitEntry->insertOrUpdateOutRecord(*face2, *interest); |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 183 | this->advanceClocks(5_ms); // @ 5ms |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 184 | |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 185 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 186 | BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::SUPPRESS); |
| 187 | |
| 188 | // Return NEW since no outRecord for face1 |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 189 | pitEntry->insertOrUpdateInRecord(*face2, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 190 | BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face1) == RetxSuppressionResult::NEW); |
| 191 | |
Davide Pesavento | 14e71f0 | 2019-03-28 17:35:25 -0400 | [diff] [blame] | 192 | this->advanceClocks(6_ms); // @ 11ms |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 193 | |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 194 | pitEntry->insertOrUpdateInRecord(*face1, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 195 | BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::FORWARD); |
| 196 | // Assume interest is sent and increment interval |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 197 | rs.incrementIntervalForOutRecord(*pitEntry->getOutRecord(*face2)); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 198 | |
Md Ashiqur Rahman | c88d2d4 | 2019-08-28 20:19:47 +0000 | [diff] [blame] | 199 | pitEntry->insertOrUpdateInRecord(*face2, *interest); |
Ashlesh Gawande | 9001599 | 2017-07-11 17:25:48 -0500 | [diff] [blame] | 200 | BOOST_CHECK(rs.decidePerUpstream(*pitEntry, *face2) == RetxSuppressionResult::SUPPRESS); |
| 201 | } |
| 202 | |
Davide Pesavento | 97210d5 | 2016-10-14 15:45:48 +0200 | [diff] [blame] | 203 | BOOST_AUTO_TEST_SUITE_END() // TestRetxSuppression |
| 204 | BOOST_AUTO_TEST_SUITE_END() // Fw |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 205 | |
| 206 | } // namespace tests |
Spyridon Mastorakis | d0381c0 | 2015-02-19 10:29:41 -0800 | [diff] [blame] | 207 | } // namespace fw |
Junxiao Shi | 192af1f | 2015-01-13 23:19:39 -0700 | [diff] [blame] | 208 | } // namespace nfd |