OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2016 Universita' degli Studi di Napoli Federico II | 3 * Copyright (c) 2016 Universita' degli Studi di Napoli Federico II |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 flow->SetStatus (FqCoDelFlow::INACTIVE); | 272 flow->SetStatus (FqCoDelFlow::INACTIVE); |
273 m_oldFlows.pop_front (); | 273 m_oldFlows.pop_front (); |
274 } | 274 } |
275 } | 275 } |
276 else | 276 else |
277 { | 277 { |
278 NS_LOG_DEBUG ("Dequeued packet " << item->GetPacket ()); | 278 NS_LOG_DEBUG ("Dequeued packet " << item->GetPacket ()); |
279 } | 279 } |
280 } while (item == 0); | 280 } while (item == 0); |
281 | 281 |
282 flow->IncreaseDeficit (-item->GetSize ()); | 282 flow->IncreaseDeficit (item->GetSize () * -1); |
283 | 283 |
284 return item; | 284 return item; |
285 } | 285 } |
286 | 286 |
287 Ptr<const QueueDiscItem> | 287 Ptr<const QueueDiscItem> |
288 FqCoDelQueueDisc::DoPeek (void) const | 288 FqCoDelQueueDisc::DoPeek (void) const |
289 { | 289 { |
290 NS_LOG_FUNCTION (this); | 290 NS_LOG_FUNCTION (this); |
291 | 291 |
292 Ptr<FqCoDelFlow> flow; | 292 Ptr<FqCoDelFlow> flow; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 { | 388 { |
389 item = qd->GetInternalQueue (0)->Dequeue (); | 389 item = qd->GetInternalQueue (0)->Dequeue (); |
390 DropAfterDequeue (item, OVERLIMIT_DROP); | 390 DropAfterDequeue (item, OVERLIMIT_DROP); |
391 len += item->GetSize (); | 391 len += item->GetSize (); |
392 } while (++count < m_dropBatchSize && len < threshold); | 392 } while (++count < m_dropBatchSize && len < threshold); |
393 | 393 |
394 return index; | 394 return index; |
395 } | 395 } |
396 | 396 |
397 } // namespace ns3 | 397 } // namespace ns3 |
OLD | NEW |