<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.nsnam.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deepakk</id>
	<title>Nsnam - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.nsnam.org/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Deepakk"/>
	<link rel="alternate" type="text/html" href="https://www.nsnam.org/wiki/Special:Contributions/Deepakk"/>
	<updated>2026-05-05T15:20:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12081</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12081"/>
		<updated>2020-08-31T16:24:46Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 10 (August 03 - August 09) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** &amp;lt;s&amp;gt;The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to ns-3, and is in its final stages of review&amp;lt;/s&amp;gt; This has been successfully [https://gitlab.com/nsnam/ns-3-dev/-/commit/3552db04ce9a44dd0fdc92913edc747676800357 merged] to mainline ns-3.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cWnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with [https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue).&lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the ns-3 [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows when RTT independence is disabled in ns-3 Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12080</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12080"/>
		<updated>2020-08-31T16:23:45Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 8 (July 20 - July 26) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** &amp;lt;s&amp;gt;The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to ns-3, and is in its final stages of review&amp;lt;/s&amp;gt; This has been successfully [https://gitlab.com/nsnam/ns-3-dev/-/commit/3552db04ce9a44dd0fdc92913edc747676800357 merged] to mainline ns-3.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cWnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with [https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue).&lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12079</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12079"/>
		<updated>2020-08-31T16:22:57Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 4 (June 22 - June 28) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** &amp;lt;s&amp;gt;The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to ns-3, and is in its final stages of review&amp;lt;/s&amp;gt; This has been successfully [https://gitlab.com/nsnam/ns-3-dev/-/commit/3552db04ce9a44dd0fdc92913edc747676800357 merged] to mainline ns-3.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cWnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12078</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12078"/>
		<updated>2020-08-31T16:21:56Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 2 (June 8 - June 14) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** &amp;lt;s&amp;gt;The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to ns-3, and is in its final stages of review&amp;lt;/s&amp;gt; This has been successfully [https://gitlab.com/nsnam/ns-3-dev/-/commit/3552db04ce9a44dd0fdc92913edc747676800357 merged] to mainline ns-3.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12077</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12077"/>
		<updated>2020-08-31T16:20:20Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 2 (June 8 - June 14) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** &amp;lt;s&amp;gt;The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to ns-3, and is in its final stages of review&amp;lt;/s&amp;gt; This has been successfully [https://gitlab.com/nsnam/ns-3-dev/-/commit/3552db04ce9a44dd0fdc92913edc747676800357 merged] to mainline ns-3.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12076</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12076"/>
		<updated>2020-08-31T16:02:38Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** &amp;lt;s&amp;gt;The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to ns-3, and is in its final stages of review&amp;lt;/s&amp;gt; This has been successfully [https://gitlab.com/nsnam/ns-3-dev/-/commit/3552db04ce9a44dd0fdc92913edc747676800357 merged] to mainline ns-3.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12075</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12075"/>
		<updated>2020-08-31T05:54:13Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Milestones and Deliverables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to mainline ns-3, and is in its final stages of review.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
&lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12074</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12074"/>
		<updated>2020-08-31T05:53:19Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Milestones and Deliverables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to mainline ns-3, and is in its final stages of review.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
Link to Phase 1 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b click here]&lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
Link to Phase 2 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b click here]&lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
Link to Phase 3 code: [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 click here]&lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12073</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12073"/>
		<updated>2020-08-31T05:49:18Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5b GSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to mainline ns-3, and is in its final stages of review.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12072</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12072"/>
		<updated>2020-08-31T05:48:34Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5bGSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to mainline ns-3, and is in its final stages of review.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12071</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12071"/>
		<updated>2020-08-31T05:47:38Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project goals and outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests &lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests &lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests &lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux&lt;br /&gt;
* '''Links to code written in each phase:'''&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/ea5a5d5b8e7b451912f240f6f505313ccf63223b GSoC 2020 Phase 1: Add dynamic pacing rate model to TCP]&lt;br /&gt;
** [ https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/3419114ce112665cffebd2ced62f286316b82e5bGSoC 2020 Phase 2: Add base TCP Prague model with RTT independence]&lt;br /&gt;
** [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/f4460afb9d8b09d394faaa1ff9de756f8384d331 GSoC 2020 Phase 3: Refactor TCP Prague and align with Linux]&lt;br /&gt;
** Alignment plots in the [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- one-flow] and [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ two-flow] scenarios.&lt;br /&gt;
* '''Future work:''' &lt;br /&gt;
** The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to mainline ns-3, and is in its final stages of review.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12070</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12070"/>
		<updated>2020-08-29T16:47:45Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' &lt;br /&gt;
** The merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 dynamic pacing] is almost merged to mainline ns-3, and is in its final stages of review.&lt;br /&gt;
** Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). As such, the merge request for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 TCP Prague] will soon be merged once these system tests are implemented.&lt;br /&gt;
** A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12069</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12069"/>
		<updated>2020-08-29T16:41:35Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev.&lt;br /&gt;
* Went through the documentation for TCP model in ns-3 and read about [https://github.com/JoakimMisund/PacedChirping paced chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on dynamic pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled ()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate ()&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt;TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for dynamic pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document].&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 !373]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed several differences; I am trying to identify why Linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of dynamic pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued to work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence to align with Linux.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/hackathon-prague bugs] in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the [https://registration.ietf.org/108/participants/hackathon/ IETF 108 Hackathon] and helped with https://gitlab.com/tomhenderson/ns-3-dev/-/commits/hackathon/master integration] of ns-3 Prague model alongside other L4S components (such as Dual Queue). &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup a Linux kernel supporting TCP Prague, Dual Queue model and Accurate Ecn by referring to the contemporary Linux development [https://github.com/l4steam/linux branch] maintained by the L4S team.&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/prague.py topology] in this kernel corresponding to the one-flow scenario using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Worked on experiments using the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation. The following methods were added:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateCwnd ()&amp;lt;/code&amp;gt;: Update the congestion window on receipt of each ACK, and use a &amp;quot;PRR-like&amp;quot; reduction on ECE marks.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::UpdateAlpha ()&amp;lt;/code&amp;gt;: Update the value of alpha (which corresponds to an EWMA of the fraction of bytes that were CE marked) based on &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::SlowStart ()&amp;lt;/code&amp;gt;: When &amp;lt;code&amp;gt;cWnd &amp;lt; ssThresh / 2&amp;lt;/code&amp;gt; use a slow start algorithm similar to &amp;lt;code&amp;gt;ns3::TcpLinuxReno&amp;lt;/code&amp;gt;.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::CwndChanged ()&amp;lt;/code&amp;gt;: Call &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease&amp;lt;/code&amp;gt; whenever congestion window is updated.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::EnterLoss ()&amp;lt;/code&amp;gt;: On encountering a packet loss, gradually reduce congestion window to half its original value.&lt;br /&gt;
* Validated this refactored implementation against Linux namespaces and obtained [https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- alignment] in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Implemented a [https://gitlab.com/deepakkavoor/nest/-/blob/prague-expt/examples/rtt-indep-prague.py topology] in Linux namespaces corresponding to the two-flow scenario, with Prague and Reno running over a common bottleneck supporting Dual Queue.&lt;br /&gt;
* Obtained aligning [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ results] in the two-flow scenario that validates RTT independence in ns-3 Prague with that of Linux.&lt;br /&gt;
* Worked on adding final documentation of TCP Prague to ns-3.&lt;br /&gt;
* Worked on the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments to the ns-3 Prague model.&lt;br /&gt;
* Updated the [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for ns-3 Prague model.&lt;br /&gt;
* Fixed [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 issues] related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12068</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12068"/>
		<updated>2020-08-29T16:10:58Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Milestones and Deliverables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
Along with the above features, I also worked on the following aspects that were indirectly related to TCP Prague:&lt;br /&gt;
* ECN++ and Accurate ECN, which were implemented in ns-3 as part of a 2018 [https://ecnpp-accecn-gsoc-2018.github.io/ GSoC project] was rebased onto ns-3-dev, along with a few revisions to test suites. The rebased branch can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commits/squash-accecn-rebased here].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12067</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12067"/>
		<updated>2020-08-29T16:05:11Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Milestones and Deliverables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase implemented the RTT independence feature in ns-3 TCP Prague. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implementation of the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase refactored the ns-3 Prague code to align with Linux. &lt;br /&gt;
* The structure of ns-3 Prague was moved away from ns-3 DCTCP. A &amp;quot;PRR-like&amp;quot; &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; reduction approach (that Linux follows) was added on receipt of an ACK with ECE mark.&lt;br /&gt;
* Along with this, experiments were conducted to  obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
* We used the one-flow scenario (and two-flow scenario in case of RTT independence) from the  [https://gitlab.com/tomhend/modules/l4s-evaluation l4s-evaluation module] to validate ns-3 Prague with Linux. The topology was evaluated in Linux using network namespaces (specifically using the [https://gitlab.com/nitk-nest/nest NeST framework]).&lt;br /&gt;
&lt;br /&gt;
A more elaborate description of the features added in these phases can be found in the [https://deepakkavoor.github.io/gsoc-2020-prague/ project site].&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12066</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12066"/>
		<updated>2020-08-29T14:43:44Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Milestones and Deliverables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* On receipt of each ACK, a sender would update the pacing rate as follows: &amp;lt;code&amp;gt;pacingRate = factor * cWnd * MSS / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase focused on RTT Independence and writing tests to validate the implementation. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implement the RTT independence feature following Linux Prague.&lt;br /&gt;
* The &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12065</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12065"/>
		<updated>2020-08-29T14:42:07Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Milestones and Deliverables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
This phase implemented the dynamic pacing feature in ns-3 TCP. &lt;br /&gt;
* The outcome was achieving alignment of ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* &amp;lt;code&amp;gt;pacingRate = factor * cwnd * mss / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
* I also tried to designed experiments in ns-3 to show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase focused on RTT Independence and writing tests to validate the implementation. &lt;br /&gt;
* The outcome was addition of ns-3 TCP Prague as a mirror of ns-3 DCTCP and implement the RTT independence feature following Linux Prague.&lt;br /&gt;
* The sender &amp;lt;code&amp;gt;cWnd&amp;lt;/code&amp;gt; increment during Congestion Avoidance is modified, so that Prague behaves as if it is operating at a (usually higher) target RTT. This reduces unfairness when Prague and other classic congestion controls (such as Reno) coexist within a common bottleneck.&lt;br /&gt;
* There are currently three RTT scaling heuristics in Linux: Rate, Scalable and Additive, and all were implemented in ns-3.&lt;br /&gt;
* As an example, the update equation for congestion window increment on receipt of each ACK using the &amp;quot;Rate&amp;quot; heuristic would be: &amp;lt;code&amp;gt;increment = (curRTT / targetRTT) * (curRTT / targetRTT) * 1 / cWnd&amp;lt;/code&amp;gt;, where &amp;lt;code&amp;gt;curRTT&amp;lt;/code&amp;gt; denotes the current RTT measurement and &amp;lt;code&amp;gt;targetRTT&amp;lt;/code&amp;gt; denotes the target RTT at which Prague is expected to operate.&lt;br /&gt;
* Unit tests were added to check that RTT independence in ns-3 Prague works as expected.&lt;br /&gt;
* The work done in this phase was documented in ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12064</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12064"/>
		<updated>2020-08-29T14:15:33Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Milestones and Deliverables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that TCP dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. &lt;br /&gt;
* &amp;lt;code&amp;gt;pacingRate = factor * cwnd * mss / rtt&amp;lt;/code&amp;gt;&lt;br /&gt;
* The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Ran experiments in ns-3 to try and show improvements when using dynamic pacing.&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12063</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12063"/>
		<updated>2020-08-29T04:48:32Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that we chose not to address during GSoC, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12062</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12062"/>
		<updated>2020-08-29T04:46:57Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. (I am currently working on these tests). A few features that were not part of GSoC scope of work, but would definitely help the ns-3 Prague model include: merging Dual Queue model to ns-3, adding Classic ECN detection to TCP Prague, and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12061</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12061"/>
		<updated>2020-08-29T04:44:26Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model in TCP, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, along with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' Adding system-wide tests for TCP Prague is something that was in the scope of GSoC work, but could not be fully completed. I am currently working on this aspect. A few features that were not part of GSoC scope, but would definitely help the ns-3 Prague model include merging Dual Queue model to ns-3, adding Classic ECN detection feature to TCP Prague and merging Accurate ECN to ns-3.&lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12060</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12060"/>
		<updated>2020-08-29T04:03:03Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals and Outcomes:''' The original plan at the start of this project was to add TCP Prague to ns-3 mirroring ns-3 DCTCP, implement Classic ECN detection, RTT independence and Dynamic pacing. After several discussions with my mentors, these goals and priorities were altered. The following features have been implemented in ns-3 at the end of this project:&lt;br /&gt;
** Dynamic pacing model to TCP with a test suite ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 link to code])&lt;br /&gt;
** TCP Prague that aligns with contemporary Linux implementation, with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** RTT independence in TCP Prague, with unit tests ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 link to code])&lt;br /&gt;
** Experiments to generate plots and validate the ns-3 implementation of TCP Prague with Linux ([https://drive.google.com/drive/folders/1qUhWiFwFO9eM8JQZWinMoD2TZVkC4Ca- links] [https://drive.google.com/drive/folders/1hBZ2SUlfSWEO1gRhXeUmGfAzXmd8DRGJ to] results)&lt;br /&gt;
* '''Future Work:''' &lt;br /&gt;
* '''Project Page:''' A [https://deepakkavoor.github.io/gsoc-2020-prague/ project page] was also added to give an elaborate explanation of the different features implemented as part of this work. &lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks and cryptography. Previously I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12059</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12059"/>
		<updated>2020-08-28T14:12:58Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;br /&gt;
&lt;br /&gt;
=== Week 13 (August 24 - August 30)===&lt;br /&gt;
* Added doxygen comments and slight cleanup of TCP Prague code.&lt;br /&gt;
* Setup an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/373 MR] for the TCP Prague model.&lt;br /&gt;
* Fixed issues related to delayed acknowledgements in the TCP pacing test suite.&lt;br /&gt;
* Worked on understanding how TCP system tests are written in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12058</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12058"/>
		<updated>2020-08-28T14:10:04Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Phase 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
A more elaborate description on alignment results can be found here: https://deepakkavoor.github.io/gsoc-2020-prague/&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12053</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12053"/>
		<updated>2020-08-21T15:53:08Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;br /&gt;
* Major refactoring of ns-3 Prague code to match the Linux implementation.&lt;br /&gt;
* Validated this implementation against Linux namespaces and obtained alignment in the one-flow scenario.&lt;br /&gt;
&lt;br /&gt;
=== Week 12 (August 17 - August 23)===&lt;br /&gt;
* Worked on obtaining results in the two-flow scenario to test working of RTT independence.&lt;br /&gt;
* Worked on documentation of ns-3 Prague.&lt;br /&gt;
* Worked on project site.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12052</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12052"/>
		<updated>2020-08-21T15:50:31Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Phase 3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
This phase would refactor the ns-3 Prague code to align with Linux. Along with this, we would need to run experiments and obtain aligning plots between ns-3 and Linux implementations of Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12047</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12047"/>
		<updated>2020-08-07T17:20:35Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 9 (July 27 - August 02) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12046</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12046"/>
		<updated>2020-08-07T17:20:07Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
* Setup and built a kernel supporting Prague, DualQueue and AccurateEcn by referring to the Linux development branch here [https://github.com/l4steam/linux here].&lt;br /&gt;
* Worked on setting up a [https://gitlab.com/tomhend/modules/l4s-evaluation/-/blob/hackathon/master/examples/tsvwg-scenarios.cc topology] in this kernel using Linux namespaces.&lt;br /&gt;
&lt;br /&gt;
=== Week 10 (August 03 - August 09)===&lt;br /&gt;
* Tried to run experiments with the [https://gitlab.com/tomhend/modules/l4s-evaluation/-/tree/hackathon/master l4s-evaluation] module to show that Prague experiences higher throughput in presence of other Classic flows.&lt;br /&gt;
&lt;br /&gt;
=== Week 11 (August 10 - August 16)===&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12037</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12037"/>
		<updated>2020-07-29T19:41:02Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
* Improved and refactored the code for Prague RTT independence.&lt;br /&gt;
* Added unit tests to check correct increment of Congestion window for different RTT scaling heuristics.&lt;br /&gt;
* Fixed bugs in ECN++ and AccECN code that were causing DCTCP tests to fail.&lt;br /&gt;
* Participated in the IETF 108 Hackathon and helped with integration of Prague alongside other L4S components. &lt;br /&gt;
&lt;br /&gt;
=== Week 9 (July 27 - August 02)===&lt;br /&gt;
Todo&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12017</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12017"/>
		<updated>2020-07-17T06:54:11Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 7 (July 13 - July 19) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Consider the RTT scaling factor when updating cWnd during AI.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
(Todo)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12016</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12016"/>
		<updated>2020-07-17T06:53:18Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 7 (July 13 - July 19) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Let the cWnd update during AI consider the RTT scaling factor.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Apply the EWMA update equation and increase round count only if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
(Todo)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12015</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12015"/>
		<updated>2020-07-17T06:52:26Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Let the cWnd update during AI consider the RTT scaling factor.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Only update EWMA and increase round count, if the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt; is true.&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
(Todo)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12014</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12014"/>
		<updated>2020-07-17T06:51:03Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
* Explored different topologies and configurations that would show the benefits of TCP pacing.&lt;br /&gt;
* Modified the pacing example to follow the topology as given in Figure 2 [https://homes.cs.washington.edu/~tom/pubs/pacing.pdf here].&lt;br /&gt;
* Continued the work on RTT Independence and added/modified the following methods:&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::AiAckIncrease ()&amp;lt;/code&amp;gt;: Update the per-ACK cWnd AI increase factor depending on the current RTT scaling heuristic.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::IncreaseWindow ()&amp;lt;/code&amp;gt;: Let the cWnd update during AI consider the RTT scaling factor.&lt;br /&gt;
** &amp;lt;code&amp;gt;TcpPrague::PktsAcked ()&amp;lt;/code&amp;gt;: Only update EWMA depending on the value returned by &amp;lt;code&amp;gt;TcpPrague::ShouldUpdateEwma ()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Week 8 (July 20 - July 26)===&lt;br /&gt;
(Todo)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12010</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12010"/>
		<updated>2020-07-10T17:05:41Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 7 (July 13 - July 19)===&lt;br /&gt;
(Todo)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12009</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12009"/>
		<updated>2020-07-10T17:05:11Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 6 (July 13 - July 19) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 6 (July 13 - July 19)===&lt;br /&gt;
(Todo)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12008</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=12008"/>
		<updated>2020-07-10T17:04:12Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (June 29 - July 5)===&lt;br /&gt;
* Generated merge requests for [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/341 ECN++] and [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/342 AccECN] (rebased from Wenying Dai's GSoC 2018 work).&lt;br /&gt;
* Added dynamic pacing to other congestion controls in ns-3.&lt;br /&gt;
* Analyzed packet traces (using Wireshark) for topologies designed in Linux namespaces, and inferred the following: if a Linux TCP sender has more than two eligible packets to be sent, the first two are sent back-to-back, and the rest are paced out.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (July 6 - July 12)===&lt;br /&gt;
* Extended &amp;lt;code&amp;gt;examples/tcp/tcp-pacing.cc&amp;lt;/code&amp;gt; to highlight dynamic pacing and produce time-series plots of Congestion Window, Slow Start threshold and current Pacing Rate.&lt;br /&gt;
* Added documentation regarding dynamic pacing in ns-3, and its similarities and differences to that in Linux.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (July 13 - July 19)===&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11998</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11998"/>
		<updated>2020-07-02T08:18:30Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Community Bonding Period (May 4 - May 31) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with mentors and the L4S Team, it was decided that the first phase of this project should focus on pacing in TCP Prague.&lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (July 3 - July 9) (Start of Phase 2)===&lt;br /&gt;
(To be added)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11997</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11997"/>
		<updated>2020-07-02T08:17:36Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Phase 1 details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Milestones and Deliverables =&lt;br /&gt;
The original goal as per the proposal was to add Classic ECN Detection for TCP Prague in Phase 1, RTT Independence in Phase 2, and Pacing in Phase 3.&lt;br /&gt;
&lt;br /&gt;
=== Phase 1 ===&lt;br /&gt;
* It was decided that dynamic pacing should be integrated first. The goal is to align ns-3 pacing with Linux implementation, which sets the current pacing rate based on the congestion window and prior RTT measurements. The value of &amp;lt;code&amp;gt;factor&amp;lt;/code&amp;gt; depends on whether TCP is currently in Slow Start or Congestion Avoidance. The default values used by Linux are 2 and 1.2 respectively, and we use the same. A higher factor in Slow Start allows TCP to probe for higher speeds early on.&lt;br /&gt;
&amp;lt;pre&amp;gt;pacing_rate = factor * cwnd * mss / rtt&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Rebased Joakim Misund's TCP Prague implementation and added the above dynamic pacing feature to it.&lt;br /&gt;
* A test suite was also added to check that packets are correctly paced out as per the above update equation.&lt;br /&gt;
* Generated plots for congestion windows and pacing rates in ns-3 and Linux, and justified the differences if any (this is currently being done).&lt;br /&gt;
&lt;br /&gt;
=== Phase 2 ===&lt;br /&gt;
This phase would focus on RTT Independence, and writing tests to validate the implementation. During this phase, the following additional tasks need to be considered as well:&lt;br /&gt;
* Adding documentation to Paced Chirping implementation from Joakim Misund&lt;br /&gt;
* Restructuring the Paced Chirping implementation to reduce close coupling with ns-3 Congestion Controls.&lt;br /&gt;
* Finalizing the rebased ECN++ and AccECN code written during GSoC 2018.&lt;br /&gt;
&lt;br /&gt;
=== Phase 3 ===&lt;br /&gt;
Add Classic ECN detection to Prague.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with my mentors and the L4S Team, it was decided that the first phase of this project should focus on  pacing in TCP Prague. Therefore, the pacing model from the [https://github.com/Vivek-anand-jain/Reproduce-TCP-BBR-in-ns-3 ns-3 TCP BBR] implementation will be primarily referred. &lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) (Start of Phase 1)===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
* Divided the MR (from Week 2) to now separately add support for dynamic pacing ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/339 !339]) and TCP Prague ([https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 !331]).&lt;br /&gt;
* Ran experiments using Linux namespaces to check the behaviour of TCP flows when dynamic pacing is enabled.&lt;br /&gt;
* Compared the plots from Linux and ns-3 for congestion window and pacing rate, and observed significant differences; we are currently trying to identify why linux has more frequent cwnd oscillations compared to ns-3.&lt;br /&gt;
&lt;br /&gt;
=== Week 5 (July 3 - July 9) (Start of Phase 2)===&lt;br /&gt;
(To be added)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11990</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11990"/>
		<updated>2020-06-25T12:02:14Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3 (link to my [https://gitlab.com/nsnam/ns-3-dev/-/commit/94495ca0ef8bc0ed92ebb7430bcedb520f9e3847 commit]).&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with my mentors and the L4S Team, it was decided that the first phase of this project should focus on  pacing in TCP Prague. Therefore, the pacing model from the [https://github.com/Vivek-anand-jain/Reproduce-TCP-BBR-in-ns-3 ns-3 TCP BBR] implementation will be primarily referred. &lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) ===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
(To be added)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11989</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11989"/>
		<updated>2020-06-25T11:52:06Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with my mentors and the L4S Team, it was decided that the first phase of this project should focus on  pacing in TCP Prague. Therefore, the pacing model from the [https://github.com/Vivek-anand-jain/Reproduce-TCP-BBR-in-ns-3 ns-3 TCP BBR] implementation will be primarily referred. &lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) ===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
* Worked on fixing a few issues with the MR generated in Week 2.&lt;br /&gt;
* Went through the code for RTT Independence in Linux Prague, and gathered a few notes in this [https://docs.google.com/document/d/1uSFm7tdjHJcvLan7vKVtjtj0ZlrwSmoaw_O2-n-qd20/edit?usp=sharing document] (work in progress).&lt;br /&gt;
* Added code to enable different scaling heuristics (similar to Linux).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  typedef enum&lt;br /&gt;
  {&lt;br /&gt;
    RTT_CONTROL_NONE,      //!&amp;lt; No RTT Independence&lt;br /&gt;
    RTT_CONTROL_RATE,      //!&amp;lt; Flows with e2e RTT &amp;lt; target try to achieve same throughput&lt;br /&gt;
    RTT_CONTROL_SCALABLE,  //!&amp;lt; At low RTT, trade throughput balance for same marks/RTT&lt;br /&gt;
    RTT_CONTROL_ADDITIVE   //!&amp;lt; Behave as a flow operating with extra target RTT&lt;br /&gt;
  } RttScalingMode_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* The initial commit can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/d10dcdcd8c7697d0e6f223167b673a79bcc70542 here].&lt;br /&gt;
&lt;br /&gt;
=== Week 4 (June 22 - June 28) ===&lt;br /&gt;
(To be added)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11949</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11949"/>
		<updated>2020-06-15T05:23:54Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Week 2 Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with my mentors and the L4S Team, it was decided that the first phase of this project should focus on  pacing in TCP Prague. Therefore, the pacing model from the [https://github.com/Vivek-anand-jain/Reproduce-TCP-BBR-in-ns-3 ns-3 TCP BBR] implementation will be primarily referred. &lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) ===&lt;br /&gt;
* Agreed upon the pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing model for New Reno, DCTCP and TCP Prague in ns-3 by adding methods &amp;lt;code&amp;gt; PacingEnabled&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt; UpdatePacingRate&amp;lt;/code&amp;gt;. This allows any congestion control to dynamically update its pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
* Aligned ns-3 Prague with Linux by enabling &amp;lt;code&amp;gt; TcpPrague::CongControl&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Designed a test suite &amp;lt;code&amp;gt; TcpPacingTest&amp;lt;/code&amp;gt; to test TCP packet pacing rate during Slow Start and Congestion Avoidance.&lt;br /&gt;
* Rebased Joakim Misund's [https://gitlab.com/JoakimMisund/l4s-evaluation/-/tree/tcp-prague/ work] on ns-3 Prague to latest ns-3-dev.&lt;br /&gt;
* Generated an [https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/331 MR] to add support for TCP Prague and pacing, along with the above test suite.&lt;br /&gt;
&lt;br /&gt;
=== Week 3 (June 15 - June 21) ===&lt;br /&gt;
(To be added)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11944</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11944"/>
		<updated>2020-06-08T17:22:26Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Weekly Reports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with my mentors and the L4S Team, it was decided that the first phase of this project should focus on  pacing in TCP Prague. Therefore, the pacing model from the [https://github.com/Vivek-anand-jain/Reproduce-TCP-BBR-in-ns-3 ns-3 TCP BBR] implementation will be primarily referred. &lt;br /&gt;
&lt;br /&gt;
=== Week 1 (June 1 - June 7) ===&lt;br /&gt;
* Agreed upon the basic pacing structure for TCP Prague in ns-3. The document can be found [https://docs.google.com/document/d/1PPSLOHv_t2GCkvd9b7YFWQGyQuFtsExJX2oAwQx5tEs/edit?usp=sharing here].&lt;br /&gt;
* Integrated basic pacing with TCP Prague, that allows it to set a pacing rate depending on whether it is in Slow Start or Congestion Avoidance.&lt;br /&gt;
* The corresponding commits can be found [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/a41397827a56c6dcc7eebecfa89381e485eaae26 here] and [https://gitlab.com/deepakkavoor/ns-3-dev/-/commit/dcf2c7cc54e8207be07d276395485c96cadeaf6d here].&lt;br /&gt;
&lt;br /&gt;
=== Week 2 (June 8 - June 14) ===&lt;br /&gt;
(To be added)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11932</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11932"/>
		<updated>2020-06-01T10:24:46Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Updated first month progress */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3.&lt;br /&gt;
&lt;br /&gt;
= Weekly Reports =&lt;br /&gt;
=== Community Bonding Period (May 4 - May 31) ===&lt;br /&gt;
* Established the Wiki page for this project.&lt;br /&gt;
* Rebased the GSoC 2018 [https://www.nsnam.org/wiki/GSOC2018AccECN_ECN%2B%2B implementation] of ECN++ and AccECN (without TCP options) to the latest ns-3-dev. The rebased branches can be found in my [https://gitlab.com/deepakkavoor/ns-3-dev repository]&lt;br /&gt;
* Went through the TCP models and architecture in ns-3 and studied about [https://github.com/JoakimMisund/PacedChirping Paced Chirping].&lt;br /&gt;
After a discussion with my mentors and the L4S Team, it was decided that the first phase of this project should focus on  pacing in TCP Prague. Therefore, the pacing model from the [https://github.com/Vivek-anand-jain/Reproduce-TCP-BBR-in-ns-3 ns-3 TCP BBR] implementation will be primarily referred. &lt;br /&gt;
=== Week 1 (June 1 - June 7) ===&lt;br /&gt;
(To be updated)&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11909</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11909"/>
		<updated>2020-05-06T10:42:41Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview - Provided link to my proposal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made. My proposal can be found [https://docs.google.com/document/d/17WmcPW74gGmAB_mg1y4B_ZRptNgEPkPWAzpEyK86RA4/edit?usp=sharing here].&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
	<entry>
		<id>https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11908</id>
		<title>GSOC2020Prague</title>
		<link rel="alternate" type="text/html" href="https://www.nsnam.org/mediawiki/index.php?title=GSOC2020Prague&amp;diff=11908"/>
		<updated>2020-05-06T10:03:22Z</updated>

		<summary type="html">&lt;p&gt;Deepakk: /* Project Overview - Added student and project details */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC}}&lt;br /&gt;
&lt;br /&gt;
Back to [[Summer_Projects#Google_Summer_of_Code_2020 | GSoC 2020 projects]]&lt;br /&gt;
&lt;br /&gt;
= Project Overview =&lt;br /&gt;
&lt;br /&gt;
* '''Project Name:''' TCP Prague model for ns-3&lt;br /&gt;
* '''Student:''' [mailto:deepakkavoor99@gmail.com Deepak K]&lt;br /&gt;
* '''Mentors:''' [mailto:adadeepak8@gmail.com Ankit Deepak], [mailto:tahiliani.nitk@gmail.com Mohit Tahiliani], [mailto:jain.vivek.anand@gmail.com Vivek Jain], [mailto:viyommittal@gmail.com Viyom Mittal]&lt;br /&gt;
* '''Project Goals:''' Scalable congestion controls such as DCTCP improve performance over Reno and Cubic, which perform badly in high-speed networks (because of their slow response with large congestion windows). Several additional modifications over DCTCP have been drafted into the protocol called TCP Prague, that aims to integrate scalable congestion control into the Internet while still allowing it to coexist with current Classic protocols. This project would complete the integration and testing of fallback detection, RTT independence and pacing into the TCP Prague model of ns-3. The project would also validate the aforementioned implemenation against Linux and document the changes made.&lt;br /&gt;
* '''Repository:''' [https://gitlab.com/deepakkavoor/ns-3-dev https://gitlab.com/deepakkavoor/ns-3-dev]&lt;br /&gt;
* '''About Me:''' I am a third-year undergraduate student pursuing Computer Science and Engineering at the National Institute of Technology Karnataka (NITK), India. My interests include computer networks, protocol design, cryptography and security. Previously, I have worked on implementing the Set-Associative Hashing feature for Fq-CoDel AQM in ns-3.&lt;/div&gt;</summary>
		<author><name>Deepakk</name></author>
	</entry>
</feed>