Please note: This master’s thesis presentation will take place in DC 3317.
Pedro Vitor Valenca Mizuno, Master’s candidate
David R. Cheriton School of Computer Science
Supervisor: Professor Mina Tahmasbi Arashloo
The transport layer is a layer from the network stack responsible for providing several essential services, such as congestion control, and lost packet detection and retransmission. Moreover, this layer is constantly changing to satisfy the new demands present in the network. This includes the increase in traffic, the leveraging of new hardware, and the release of new workloads.
However, implementing these protocols is a considerably challenging task due to several reasons. First, the available documentation about these algorithms is written in natural language and can be long, which may result in misinterpretations, and consequently, incorrect implementations. Second, while developing transport algorithms, programmers must deeply study the environment where the protocol will run to find the best-suiting built-in helper functions and data structures available for their implementations. For this reason, the protocols are usually implemented as large sections of optimized code that are challenging to navigate, read, and modify. Third, since the transport layer is located between two other layers, namely application and network, transport algorithms must handle the details of these interactions, which can depend on the execution environment.
In this thesis, we introduce Modular Transport Programming (MTP). This event-driven framework allows the declaration of transport algorithms with a high-level, yet, precise language. MTP abstracts low-level details by providing a set of high-level built-in functions and constructs focused solely on transport programming. It also abstracts the interactions between the transport layer and its neighbours by having interfaces responsible for such communication. Moreover, it improves the readability of MTP code by having a modularized design that clearly shows how each module interacts with the other and how the events are processed.
To explore the feasibility and effectiveness of MTP, we chose to implement transport protocols in the Linux Kernel. The Linux Kernel and its transport layer implementations are some of the most notable examples that highlight the challenges stated above. These implementations can require thousands of lines of code and hundreds of functions, which are difficult to navigate due to the low-level C used to write their codes. Additionally, transport protocol implementations in the Kernel are tightly linked with the neighbouring layers of the network stack, utilizing complex data structures for packet processing and socket interface. Thus, implementing protocols from the start or modifying already existing ones can be a considerably difficult task.
Nevertheless, instead of directly implementing protocols to the Linux Kernel, we opted to use the eXpress Data Path (XDP) framework as our first step. This framework allows a simple and safe loading of new user-defined code to the Linux Kernel. Moreover, several characteristics of the framework are ideal for the implementation of transport layer protocols, such as its loading point being in the Network Interface Card (NIC) driver and allowing Kernel bypass. Thus, this thesis also introduces a back-end developed in the XDP framework, to which the MTP code can be compiled using our code generator. During the development of this back-end, we explored XDP in depth to make wise design decisions. This includes utilizing a set of data structures best suited for our model, making the most of the helper functions available in its libraries, and bypassing the limitations of this framework.
Finally, we show that it is possible to specify the logic of transport protocols in a high-level language and translate it to XDP. We implemented two protocols, TCP and RoCEv2, in the MTP language and successfully translated them with our compiler to the XDP back-end. Moreover, between two servers connected by 100Gbps links, the TCP implementation presented 80Gbps of throughput with 16 cores processing packets. Meanwhile, RoCEv2 translation is functional but still needs further optimizations to reach its expected performance. Lastly, we evaluate the strengths and weaknesses of XDP for transport programming.