blob: a63c9de44da9679098a9dfe8800f2f8539e0f73a [file] [log] [blame]
Davide Pesaventobf1c0692017-01-15 19:15:09 -05001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Chavoosh Ghasemi4d36ed52017-10-31 22:26:25 +00002/*
Davide Pesaventocd65c2c2017-01-15 16:10:38 -05003 * Copyright (c) 2016-2017, Regents of the University of California,
4 * Colorado State University,
5 * University Pierre & Marie Curie, Sorbonne University.
Weiwei Liu245d7912016-07-28 00:04:25 -07006 *
7 * This file is part of ndn-tools (Named Data Networking Essential Tools).
8 * See AUTHORS.md for complete list of ndn-tools authors and contributors.
9 *
10 * ndn-tools is free software: you can redistribute it and/or modify it under the terms
11 * of the GNU General Public License as published by the Free Software Foundation,
12 * either version 3 of the License, or (at your option) any later version.
13 *
14 * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
15 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 * PURPOSE. See the GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along with
19 * ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
20 *
21 * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
22 *
23 * @author Shuo Yang
24 * @author Weiwei Liu
Chavoosh Ghasemi4d36ed52017-10-31 22:26:25 +000025 * @author Chavoosh Ghasemi
Weiwei Liu245d7912016-07-28 00:04:25 -070026 */
27
28#include "pipeline-interests-aimd.hpp"
Davide Pesavento44b3b232017-12-23 16:58:25 -050029#include "data-fetcher.hpp"
Weiwei Liu245d7912016-07-28 00:04:25 -070030
31#include <cmath>
32
33namespace ndn {
34namespace chunks {
35namespace aimd {
36
Chavoosh Ghasemi641f5932017-11-06 22:45:11 +000037constexpr double PipelineInterestsAimd::MIN_SSTHRESH;
38
Weiwei Liu245d7912016-07-28 00:04:25 -070039PipelineInterestsAimd::PipelineInterestsAimd(Face& face, RttEstimator& rttEstimator,
40 const Options& options)
41 : PipelineInterests(face)
42 , m_options(options)
43 , m_rttEstimator(rttEstimator)
44 , m_scheduler(m_face.getIoService())
Davide Pesaventocd65c2c2017-01-15 16:10:38 -050045 , m_checkRtoEvent(m_scheduler)
Weiwei Liu245d7912016-07-28 00:04:25 -070046 , m_highData(0)
47 , m_highInterest(0)
48 , m_recPoint(0)
49 , m_nInFlight(0)
Weiwei Liu245d7912016-07-28 00:04:25 -070050 , m_nLossEvents(0)
51 , m_nRetransmitted(0)
Chavoosh Ghasemi641f5932017-11-06 22:45:11 +000052 , m_nCongMarks(0)
Weiwei Liu245d7912016-07-28 00:04:25 -070053 , m_cwnd(m_options.initCwnd)
54 , m_ssthresh(m_options.initSsthresh)
55 , m_hasFailure(false)
56 , m_failedSegNo(0)
57{
58 if (m_options.isVerbose) {
59 std::cerr << m_options;
60 }
61}
62
63PipelineInterestsAimd::~PipelineInterestsAimd()
64{
65 cancel();
66}
67
68void
69PipelineInterestsAimd::doRun()
70{
Weiwei Liu245d7912016-07-28 00:04:25 -070071 // schedule the event to check retransmission timer
Davide Pesaventocd65c2c2017-01-15 16:10:38 -050072 m_checkRtoEvent = m_scheduler.scheduleEvent(m_options.rtoCheckInterval, [this] { checkRto(); });
Weiwei Liu245d7912016-07-28 00:04:25 -070073
Davide Pesavento958896e2017-01-19 00:52:04 -050074 schedulePackets();
Weiwei Liu245d7912016-07-28 00:04:25 -070075}
76
77void
78PipelineInterestsAimd::doCancel()
79{
80 for (const auto& entry : m_segmentInfo) {
Davide Pesaventocd65c2c2017-01-15 16:10:38 -050081 m_face.removePendingInterest(entry.second.interestId);
Weiwei Liu245d7912016-07-28 00:04:25 -070082 }
Davide Pesaventocd65c2c2017-01-15 16:10:38 -050083 m_checkRtoEvent.cancel();
Weiwei Liu245d7912016-07-28 00:04:25 -070084 m_segmentInfo.clear();
Weiwei Liu245d7912016-07-28 00:04:25 -070085}
86
87void
88PipelineInterestsAimd::checkRto()
89{
90 if (isStopping())
91 return;
92
Davide Pesavento958896e2017-01-19 00:52:04 -050093 bool hasTimeout = false;
Weiwei Liu245d7912016-07-28 00:04:25 -070094
95 for (auto& entry : m_segmentInfo) {
96 SegmentInfo& segInfo = entry.second;
97 if (segInfo.state != SegmentState::InRetxQueue && // do not check segments currently in the retx queue
98 segInfo.state != SegmentState::RetxReceived) { // or already-received retransmitted segments
99 Milliseconds timeElapsed = time::steady_clock::now() - segInfo.timeSent;
100 if (timeElapsed.count() > segInfo.rto.count()) { // timer expired?
Davide Pesavento958896e2017-01-19 00:52:04 -0500101 hasTimeout = true;
102 enqueueForRetransmission(entry.first);
Weiwei Liu245d7912016-07-28 00:04:25 -0700103 }
104 }
105 }
106
Davide Pesavento958896e2017-01-19 00:52:04 -0500107 if (hasTimeout) {
108 recordTimeout();
109 schedulePackets();
Weiwei Liu245d7912016-07-28 00:04:25 -0700110 }
111
112 // schedule the next check after predefined interval
Davide Pesaventocd65c2c2017-01-15 16:10:38 -0500113 m_checkRtoEvent = m_scheduler.scheduleEvent(m_options.rtoCheckInterval, [this] { checkRto(); });
Weiwei Liu245d7912016-07-28 00:04:25 -0700114}
115
116void
117PipelineInterestsAimd::sendInterest(uint64_t segNo, bool isRetransmission)
118{
119 if (isStopping())
120 return;
121
122 if (m_hasFinalBlockId && segNo > m_lastSegmentNo && !isRetransmission)
123 return;
124
125 if (!isRetransmission && m_hasFailure)
126 return;
127
128 if (m_options.isVerbose) {
Davide Pesavento958896e2017-01-19 00:52:04 -0500129 std::cerr << (isRetransmission ? "Retransmitting" : "Requesting")
130 << " segment #" << segNo << std::endl;
Weiwei Liu245d7912016-07-28 00:04:25 -0700131 }
132
133 if (isRetransmission) {
Davide Pesavento958896e2017-01-19 00:52:04 -0500134 // keep track of retx count for this segment
135 auto ret = m_retxCount.emplace(segNo, 1);
Weiwei Liu245d7912016-07-28 00:04:25 -0700136 if (ret.second == false) { // not the first retransmission
137 m_retxCount[segNo] += 1;
Davide Pesavento44b3b232017-12-23 16:58:25 -0500138 if (m_options.maxRetriesOnTimeoutOrNack != DataFetcher::MAX_RETRIES_INFINITE &&
139 m_retxCount[segNo] > m_options.maxRetriesOnTimeoutOrNack) {
Weiwei Liu245d7912016-07-28 00:04:25 -0700140 return handleFail(segNo, "Reached the maximum number of retries (" +
141 to_string(m_options.maxRetriesOnTimeoutOrNack) +
142 ") while retrieving segment #" + to_string(segNo));
143 }
144
145 if (m_options.isVerbose) {
146 std::cerr << "# of retries for segment #" << segNo
147 << " is " << m_retxCount[segNo] << std::endl;
148 }
149 }
150
151 m_face.removePendingInterest(m_segmentInfo[segNo].interestId);
152 }
153
154 Interest interest(Name(m_prefix).appendSegment(segNo));
155 interest.setInterestLifetime(m_options.interestLifetime);
156 interest.setMustBeFresh(m_options.mustBeFresh);
157 interest.setMaxSuffixComponents(1);
158
159 auto interestId = m_face.expressInterest(interest,
160 bind(&PipelineInterestsAimd::handleData, this, _1, _2),
161 bind(&PipelineInterestsAimd::handleNack, this, _1, _2),
Davide Pesaventoe9c69852017-11-04 18:08:37 -0400162 bind(&PipelineInterestsAimd::handleLifetimeExpiration, this, _1));
Weiwei Liu245d7912016-07-28 00:04:25 -0700163 m_nInFlight++;
164
165 if (isRetransmission) {
166 SegmentInfo& segInfo = m_segmentInfo[segNo];
Weiwei Liu245d7912016-07-28 00:04:25 -0700167 segInfo.timeSent = time::steady_clock::now();
Davide Pesavento958896e2017-01-19 00:52:04 -0500168 segInfo.rto = m_rttEstimator.getEstimatedRto();
169 segInfo.state = SegmentState::Retransmitted;
Weiwei Liu245d7912016-07-28 00:04:25 -0700170 m_nRetransmitted++;
171 }
172 else {
173 m_highInterest = segNo;
Davide Pesavento958896e2017-01-19 00:52:04 -0500174 m_segmentInfo[segNo] = {interestId,
175 time::steady_clock::now(),
176 m_rttEstimator.getEstimatedRto(),
177 SegmentState::FirstTimeSent};
Weiwei Liu245d7912016-07-28 00:04:25 -0700178 }
179}
180
181void
182PipelineInterestsAimd::schedulePackets()
183{
Davide Pesaventobf1c0692017-01-15 19:15:09 -0500184 BOOST_ASSERT(m_nInFlight >= 0);
185 auto availableWindowSize = static_cast<int64_t>(m_cwnd) - m_nInFlight;
186
Weiwei Liu245d7912016-07-28 00:04:25 -0700187 while (availableWindowSize > 0) {
188 if (!m_retxQueue.empty()) { // do retransmission first
189 uint64_t retxSegNo = m_retxQueue.front();
190 m_retxQueue.pop();
191
192 auto it = m_segmentInfo.find(retxSegNo);
193 if (it == m_segmentInfo.end()) {
194 continue;
195 }
196 // the segment is still in the map, it means that it needs to be retransmitted
197 sendInterest(retxSegNo, true);
198 }
199 else { // send next segment
200 sendInterest(getNextSegmentNo(), false);
201 }
202 availableWindowSize--;
203 }
204}
205
206void
207PipelineInterestsAimd::handleData(const Interest& interest, const Data& data)
208{
209 if (isStopping())
210 return;
211
212 // Data name will not have extra components because MaxSuffixComponents is set to 1
213 BOOST_ASSERT(data.getName().equals(interest.getName()));
214
215 if (!m_hasFinalBlockId && !data.getFinalBlockId().empty()) {
216 m_lastSegmentNo = data.getFinalBlockId().toSegment();
217 m_hasFinalBlockId = true;
218 cancelInFlightSegmentsGreaterThan(m_lastSegmentNo);
219 if (m_hasFailure && m_lastSegmentNo >= m_failedSegNo) {
220 // previously failed segment is part of the content
221 return onFailure(m_failureReason);
Chavoosh Ghasemi4d36ed52017-10-31 22:26:25 +0000222 }
223 else {
Weiwei Liu245d7912016-07-28 00:04:25 -0700224 m_hasFailure = false;
225 }
226 }
227
Davide Pesaventobf1c0692017-01-15 19:15:09 -0500228 uint64_t recvSegNo = getSegmentFromPacket(data);
Weiwei Liu245d7912016-07-28 00:04:25 -0700229 SegmentInfo& segInfo = m_segmentInfo[recvSegNo];
230 if (segInfo.state == SegmentState::RetxReceived) {
231 m_segmentInfo.erase(recvSegNo);
232 return; // ignore already-received segment
233 }
234
235 Milliseconds rtt = time::steady_clock::now() - segInfo.timeSent;
Weiwei Liu245d7912016-07-28 00:04:25 -0700236 if (m_options.isVerbose) {
237 std::cerr << "Received segment #" << recvSegNo
238 << ", rtt=" << rtt.count() << "ms"
239 << ", rto=" << segInfo.rto.count() << "ms" << std::endl;
240 }
241
Davide Pesavento958896e2017-01-19 00:52:04 -0500242 if (m_highData < recvSegNo) {
243 m_highData = recvSegNo;
244 }
245
246 // for segments in retx queue, we must not decrement m_nInFlight
247 // because it was already decremented when the segment timed out
248 if (segInfo.state != SegmentState::InRetxQueue) {
Weiwei Liu245d7912016-07-28 00:04:25 -0700249 m_nInFlight--;
250 }
251
Chavoosh Ghasemi641f5932017-11-06 22:45:11 +0000252 // upon finding congestion mark, decrease the window size
253 // without retransmitting any packet
254 if (data.getCongestionMark() > 0) {
255 m_nCongMarks++;
256 if (!m_options.ignoreCongMarks) {
257 if (m_options.disableCwa || m_highData > m_recPoint) {
258 m_recPoint = m_highInterest; // react to only one congestion event (timeout or congestion mark)
259 // per RTT (conservative window adaptation)
260 decreaseWindow();
261
262 if (m_options.isVerbose) {
263 std::cerr << "Received congestion mark, value = " << data.getCongestionMark()
264 << ", new cwnd = " << m_cwnd << std::endl;
265 }
266 }
267 }
268 else {
269 increaseWindow();
270 }
271 }
272 else {
273 increaseWindow();
274 }
275
Davide Pesaventoe9c69852017-11-04 18:08:37 -0400276 onData(data);
Weiwei Liu245d7912016-07-28 00:04:25 -0700277
278 if (segInfo.state == SegmentState::FirstTimeSent ||
279 segInfo.state == SegmentState::InRetxQueue) { // do not sample RTT for retransmitted segments
Davide Pesaventobf1c0692017-01-15 19:15:09 -0500280 auto nExpectedSamples = std::max<int64_t>((m_nInFlight + 1) >> 1, 1);
281 BOOST_ASSERT(nExpectedSamples > 0);
282 m_rttEstimator.addMeasurement(recvSegNo, rtt, static_cast<size_t>(nExpectedSamples));
Weiwei Liu245d7912016-07-28 00:04:25 -0700283 m_segmentInfo.erase(recvSegNo); // remove the entry associated with the received segment
284 }
285 else { // retransmission
Davide Pesavento958896e2017-01-19 00:52:04 -0500286 BOOST_ASSERT(segInfo.state == SegmentState::Retransmitted);
Weiwei Liu245d7912016-07-28 00:04:25 -0700287 segInfo.state = SegmentState::RetxReceived;
288 }
289
290 BOOST_ASSERT(m_nReceived > 0);
Davide Pesaventobf1c0692017-01-15 19:15:09 -0500291 if (m_hasFinalBlockId &&
292 static_cast<uint64_t>(m_nReceived - 1) >= m_lastSegmentNo) { // all segments have been received
Weiwei Liu245d7912016-07-28 00:04:25 -0700293 cancel();
294 if (m_options.isVerbose) {
295 printSummary();
296 }
297 }
298 else {
299 schedulePackets();
300 }
301}
302
303void
304PipelineInterestsAimd::handleNack(const Interest& interest, const lp::Nack& nack)
305{
306 if (isStopping())
307 return;
308
309 if (m_options.isVerbose)
310 std::cerr << "Received Nack with reason " << nack.getReason()
311 << " for Interest " << interest << std::endl;
312
Davide Pesaventobf1c0692017-01-15 19:15:09 -0500313 uint64_t segNo = getSegmentFromPacket(interest);
Weiwei Liu245d7912016-07-28 00:04:25 -0700314
315 switch (nack.getReason()) {
Davide Pesavento958896e2017-01-19 00:52:04 -0500316 case lp::NackReason::DUPLICATE:
317 // ignore duplicates
Weiwei Liu245d7912016-07-28 00:04:25 -0700318 break;
Davide Pesavento958896e2017-01-19 00:52:04 -0500319 case lp::NackReason::CONGESTION:
320 // treated the same as timeout for now
321 enqueueForRetransmission(segNo);
322 recordTimeout();
323 schedulePackets();
324 break;
325 default:
Weiwei Liu245d7912016-07-28 00:04:25 -0700326 handleFail(segNo, "Could not retrieve data for " + interest.getName().toUri() +
327 ", reason: " + boost::lexical_cast<std::string>(nack.getReason()));
328 break;
Weiwei Liu245d7912016-07-28 00:04:25 -0700329 }
330}
331
332void
333PipelineInterestsAimd::handleLifetimeExpiration(const Interest& interest)
334{
335 if (isStopping())
336 return;
337
Davide Pesavento958896e2017-01-19 00:52:04 -0500338 enqueueForRetransmission(getSegmentFromPacket(interest));
339 recordTimeout();
340 schedulePackets();
Weiwei Liu245d7912016-07-28 00:04:25 -0700341}
342
343void
Davide Pesavento958896e2017-01-19 00:52:04 -0500344PipelineInterestsAimd::recordTimeout()
Weiwei Liu245d7912016-07-28 00:04:25 -0700345{
Weiwei Liu245d7912016-07-28 00:04:25 -0700346 if (m_options.disableCwa || m_highData > m_recPoint) {
347 // react to only one timeout per RTT (conservative window adaptation)
348 m_recPoint = m_highInterest;
349
350 decreaseWindow();
351 m_rttEstimator.backoffRto();
352 m_nLossEvents++;
353
354 if (m_options.isVerbose) {
Chavoosh Ghasemi641f5932017-11-06 22:45:11 +0000355 std::cerr << "Packet loss event, new cwnd = " << m_cwnd
Weiwei Liu245d7912016-07-28 00:04:25 -0700356 << ", ssthresh = " << m_ssthresh << std::endl;
357 }
358 }
Davide Pesavento958896e2017-01-19 00:52:04 -0500359}
Weiwei Liu245d7912016-07-28 00:04:25 -0700360
Davide Pesavento958896e2017-01-19 00:52:04 -0500361void
362PipelineInterestsAimd::enqueueForRetransmission(uint64_t segNo)
363{
364 BOOST_ASSERT(m_nInFlight > 0);
365 m_nInFlight--;
366 m_retxQueue.push(segNo);
367 m_segmentInfo.at(segNo).state = SegmentState::InRetxQueue;
Weiwei Liu245d7912016-07-28 00:04:25 -0700368}
369
370void
371PipelineInterestsAimd::handleFail(uint64_t segNo, const std::string& reason)
372{
373 if (isStopping())
374 return;
375
376 // if the failed segment is definitely part of the content, raise a fatal error
377 if (m_hasFinalBlockId && segNo <= m_lastSegmentNo)
378 return onFailure(reason);
379
380 if (!m_hasFinalBlockId) {
381 m_segmentInfo.erase(segNo);
Davide Pesavento958896e2017-01-19 00:52:04 -0500382 m_nInFlight--;
Weiwei Liu245d7912016-07-28 00:04:25 -0700383
384 if (m_segmentInfo.empty()) {
385 onFailure("Fetching terminated but no final segment number has been found");
386 }
387 else {
388 cancelInFlightSegmentsGreaterThan(segNo);
389 m_hasFailure = true;
390 m_failedSegNo = segNo;
391 m_failureReason = reason;
392 }
393 }
394}
395
396void
397PipelineInterestsAimd::increaseWindow()
398{
399 if (m_cwnd < m_ssthresh) {
400 m_cwnd += m_options.aiStep; // additive increase
Chavoosh Ghasemi4d36ed52017-10-31 22:26:25 +0000401 }
402 else {
Weiwei Liu245d7912016-07-28 00:04:25 -0700403 m_cwnd += m_options.aiStep / std::floor(m_cwnd); // congestion avoidance
404 }
Davide Pesavento958896e2017-01-19 00:52:04 -0500405
Davide Pesaventobf1c0692017-01-15 19:15:09 -0500406 afterCwndChange(time::steady_clock::now() - getStartTime(), m_cwnd);
Weiwei Liu245d7912016-07-28 00:04:25 -0700407}
408
409void
410PipelineInterestsAimd::decreaseWindow()
411{
412 // please refer to RFC 5681, Section 3.1 for the rationale behind it
Chavoosh Ghasemi641f5932017-11-06 22:45:11 +0000413 m_ssthresh = std::max(MIN_SSTHRESH, m_cwnd * m_options.mdCoef); // multiplicative decrease
Weiwei Liu245d7912016-07-28 00:04:25 -0700414 m_cwnd = m_options.resetCwndToInit ? m_options.initCwnd : m_ssthresh;
Davide Pesavento958896e2017-01-19 00:52:04 -0500415
Davide Pesaventobf1c0692017-01-15 19:15:09 -0500416 afterCwndChange(time::steady_clock::now() - getStartTime(), m_cwnd);
Weiwei Liu245d7912016-07-28 00:04:25 -0700417}
418
Weiwei Liu245d7912016-07-28 00:04:25 -0700419void
Davide Pesavento958896e2017-01-19 00:52:04 -0500420PipelineInterestsAimd::cancelInFlightSegmentsGreaterThan(uint64_t segNo)
Weiwei Liu245d7912016-07-28 00:04:25 -0700421{
422 for (auto it = m_segmentInfo.begin(); it != m_segmentInfo.end();) {
423 // cancel fetching all segments that follow
Davide Pesavento958896e2017-01-19 00:52:04 -0500424 if (it->first > segNo) {
Weiwei Liu245d7912016-07-28 00:04:25 -0700425 m_face.removePendingInterest(it->second.interestId);
426 it = m_segmentInfo.erase(it);
Davide Pesavento958896e2017-01-19 00:52:04 -0500427 m_nInFlight--;
Weiwei Liu245d7912016-07-28 00:04:25 -0700428 }
429 else {
430 ++it;
431 }
432 }
433}
434
435void
436PipelineInterestsAimd::printSummary() const
437{
Chavoosh Ghasemi4d36ed52017-10-31 22:26:25 +0000438 PipelineInterests::printSummary();
439 std::cerr << "Total # of packet loss events: " << m_nLossEvents << "\n"
Weiwei Liu245d7912016-07-28 00:04:25 -0700440 << "Packet loss rate: "
441 << static_cast<double>(m_nLossEvents) / static_cast<double>(m_nReceived) << "\n"
Chavoosh Ghasemi641f5932017-11-06 22:45:11 +0000442 << "Total # of retransmitted segments: " << m_nRetransmitted << "\n"
443 << "Total # of received congestion marks: " << m_nCongMarks << "\n";
Weiwei Liu245d7912016-07-28 00:04:25 -0700444}
445
446std::ostream&
447operator<<(std::ostream& os, SegmentState state)
448{
449 switch (state) {
450 case SegmentState::FirstTimeSent:
451 os << "FirstTimeSent";
452 break;
453 case SegmentState::InRetxQueue:
454 os << "InRetxQueue";
455 break;
456 case SegmentState::Retransmitted:
457 os << "Retransmitted";
458 break;
459 case SegmentState::RetxReceived:
460 os << "RetxReceived";
461 break;
462 }
Weiwei Liu245d7912016-07-28 00:04:25 -0700463 return os;
464}
465
466std::ostream&
467operator<<(std::ostream& os, const PipelineInterestsAimdOptions& options)
468{
Davide Pesavento44b3b232017-12-23 16:58:25 -0500469 os << "AIMD pipeline parameters:\n"
Weiwei Liu245d7912016-07-28 00:04:25 -0700470 << "\tInitial congestion window size = " << options.initCwnd << "\n"
471 << "\tInitial slow start threshold = " << options.initSsthresh << "\n"
Weiwei Liu245d7912016-07-28 00:04:25 -0700472 << "\tAdditive increase step = " << options.aiStep << "\n"
Davide Pesavento958896e2017-01-19 00:52:04 -0500473 << "\tMultiplicative decrease factor = " << options.mdCoef << "\n"
Weiwei Liu245d7912016-07-28 00:04:25 -0700474 << "\tRTO check interval = " << options.rtoCheckInterval << "\n"
Davide Pesavento44b3b232017-12-23 16:58:25 -0500475 << "\tMax retries on timeout or Nack = " << (options.maxRetriesOnTimeoutOrNack == DataFetcher::MAX_RETRIES_INFINITE ?
476 "infinite" : to_string(options.maxRetriesOnTimeoutOrNack)) << "\n"
Chavoosh Ghasemi641f5932017-11-06 22:45:11 +0000477 << "\tReaction to congestion marks " << (options.ignoreCongMarks ? "disabled" : "enabled") << "\n"
Davide Pesavento44b3b232017-12-23 16:58:25 -0500478 << "\tConservative window adaptation " << (options.disableCwa ? "disabled" : "enabled") << "\n"
Davide Pesavento958896e2017-01-19 00:52:04 -0500479 << "\tResetting cwnd to " << (options.resetCwndToInit ? "initCwnd" : "ssthresh") << " upon loss event\n";
Weiwei Liu245d7912016-07-28 00:04:25 -0700480 return os;
481}
482
483} // namespace aimd
484} // namespace chunks
485} // namespace ndn