kamila.is

I took a fun course on Software-Defined Networking (with P4), and later also wrote my Master thesis about SDN. Here is what I did and learned.

Master thesis: FPGA-based packet forwarding

The code

A P4-based border router for the SCION future Internet architecture, runnable in software or on the NetFPGA SUME. The NetFPGA is a board capable of running at 40Gbps, and a prototype P4 compiler is available for it. I did some horrible things to make the very prototype compiler work, and learned a lot about FPGAs in the process.

Thesis Defence Talk

Presentation I gave for my thesis defence. Goes into implementation details.

Thesis

The thesis itself, contains a lot of information + context.

Help! I have an FPGA!

Talk that focuses less on the implementation details and more on what I learned as a software engineer working with an FPGA and P4.

Course project: Load balancer

The project

I created a load balancer able to distribute the traffic on real-time server metrics, at line rate. The data plane uses fun data structures such as Bloom filters and fights the P4 compiler in terrible ways. And I think the code is readable and pretty!

Presentation

Describes how my load balancer works. Has lots of diagrams!

Report

Explains things in more detail than the presentation, plus contains evaluation.

P4 notes

How to…

Multicast

  • multicast group is a thingy with an ID, created via control plane and used from data plane
    • CLI for creating it: mc_mgrp_create <group_id>
    • using it from P4 code: standard_metadata.mcast_grp = 47
  • multicast node is for informing the switch that this port can be used for multicast. Nodes are associated with (/put into) groups. Usually there would be a 1:1 correspondence with a port, but it can be multiple ports too – that makes sense if these ports will always be used together.
    • CLI for making a multicast node from a port: mc_node_create <node_id> <port_number(s)>
      • this returns a node handle ID, which is numbered from 0 in the order it was created ==> first node will be handle ID 0, second handle ID 1…
      • in order to make it even more confusing, node_id is actually called “replication ID”
      • multicast nodes are assigned into multicast groups by the control plane via CLI: mc_node_associate <mcast_grp_id> <node_handle_id> (many nodes to 1 group)

therefore:

  1. create group in control plane: mc_mgrp_create 1
  2. create multicast node(s): mc_node_create 0 1 2 3
  3. put nodes into groups: mc_node_associate 1 0