What is switchdev?

Most of the projects discussed on our webpage focus on opening up networking equipment to the broader IT Ecosystem, and allowing for similar monitoring, management and operations.

In the switchdev approach, a standard Linux uses a specific driver model to integrate networking hardware into the standard Linux server environment. This driver then allows the Linux kernel itself to expose the hardware accelerated networking ports to be exposed as standard Linux interfaces. In such a design, ifconfig -a would show all the ethernet interfaces on the device , like eth30 or eth45. You would use the linux brctl (bridgecontrol) command to create switching configurations, ifconfig to add IP addresses to interfaces, route add to add routes, and so on. For the ASIC based ports, the forwarding rules will be pushed into the hardware and happen in line rate.

There are certain parts that Linux does not know how to control (yet), like optical interfaces or updating the switch firmware. For most of these cases, the vendors offer specific software solutions that provide the needed functionallity.

This approach also allows to develop code against the hardware accelerated ports the same way writing code against any linux interface. No special SDK is needed, the driver will take care of all needed translation to the ASIC.

This also immediatelyenables us to use any existing Linux application out of the box, and run it using the hardware accelerated ports. For installation, no special steps are needed. Just install the software via apt-get, yum, or another packet manager using the standard repositories. This way, for example iperf3 or perfsonar can be immediately installed and run natively.

Using these architectures, it is important to understand how the CPU and the dataplane are connected inside the switch. This connection might provide a bottleneck if large amounts of data needs to pass from the dataplane to the CPU and vice versa. You will find some real world examples on our "Switchdev on Fedora page".