In this slide, I will introduce what is switchdev and what problem it wants to solve. To this day, most of the hardware switch's application-specific integrated circuit (ASIC) only be controlled by the vendor's proprietary binary (SDK) and it's inconvenient for system administrator/developer. In order to break the chip vendor's lock-in situation, the switchdev had been designed to solve this. With the help of switchdev, we can develop a general solution for hardware switch chips and break the connection with vendor's binary-blob (SDK).
In order words. Linux kernel can directly communicate with the vendor's proprietary ASIC now, and the software programmer/system administrator can easily control that ASIC to provide more flexible, powerful and programmable network function.
• Did you open a ssh connection into the
home router before?
• There’re five physical ports but can see
two ports in your Linux command
• 5 ports (wan +
• Only two ports
in the linux
• Usually, there’re a embedded switch
connecting all physical(Lan) ports
• Only report one port to kernel
• That switch supports the hardware offload
for those lan ports
– By MAC address.
WAN LAN 1 LAN 2 LAN 3 LAN 4
Without CPUWith Main CPU
What’s The Problem
• We can’t use the common Linux tools to
operate with all physical ports.
• But, if we use a binary-blob provided by
the chip vendor, we can control those
magic part now.
What We Want
Can we use the common tools to control
those ports ?
What We Want
That’s what switchdev want to solve
• High-end networking hardware
– Linux capable
– Reality, has its functionality implemented only
in a proprietary blob.
– Replace those proprietary blocks with standard
• Originates in OpenvSwitch from 2014.
• A general solution for hardware switch
– We use the netdev in the linux kernel for
network interface card.
• Make a concerted effort to break the
Linux Network Stack
Switch Device (sw1)
Offload data path
ip route tc apps
p1 p2 p3 p4 p5 p6
• Port topology
• Port status
– PHY link state
– I/O statistics