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.
Control Your Network ASICs, What Benefits switchdev Can Bring Us
1. Control Your Network ASICs, What Benefits Switchdev
Can Bring Us
Hung-Wei Chiu(hwchiu)
2. Who Am I
• Hung-Wei Chiu (hwchiu)
• DevOps Engineer at ThunderToken
• Co-Organizer of SDNDS-TW/CNTUG
• Fields
– Linux Networks
– SDN
– Container/Kubernetes
3. Outline
• Why We Need the Switchdev
• How Switchdev Works
• Example Cases
5. From the SDN
• SDN definition (From ONF)
– DIRECTLY PROGRAMMABLE
– AGILE
– CENTRALLY MANAGED
– PROGRAMMATICALLY CONFIGURED
– OPEN STANDARDS-BASED AND VENDOR-
NEUTRAL
6. Beyond The OF/P4
• But there are still many networking
devices can’t be controlled by general
methods.
• General methods
– Linux Commands
– Not Propitiatory tools
8. Home Router
• 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
9. Home Router
• 5 ports (wan +
lan)
• Only two ports
in the linux
system.
https://www.smallnetbuilder.com/wireless/wireless-reviews
10. Why
• 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.
11. Example
WAN LAN 1 LAN 2 LAN 3 LAN 4
Without CPUWith Main CPU
Hardware Board
12. What’s The Problem
• We can’t use the common Linux tools to
operate with all physical ports.
– ip/route/ifconfig/tc/
• But, if we use a binary-blob provided by
the chip vendor, we can control those
magic part now.
13. What We Want
Can we use the common tools to control
those ports ?
16. Introduction
• High-end networking hardware
– Linux capable
– Reality, has its functionality implemented only
in a proprietary blob.
• Switchdev
– Replace those proprietary blocks with standard
kernel interface.
17. Introduction
• Originates in OpenvSwitch from 2014.
• A general solution for hardware switch
chips
– We use the netdev in the linux kernel for
network interface card.
• Make a concerted effort to break the
vendor’s lock-in.
18. Overview
user space
kernel space
kernel space
hardware
Switch Driver
Linux Network Stack
Switch Device (sw1)
Offload data path
ip route tc apps
p1 p2 p3 p4 p5 p6
Hardware Bus
sw1p1
sw1p2
sw1p3
sw1p4
sw1p5
sw1p6
netlink
22. Vendors
• Vendor should implement its driver based
on the switchdev and contribute to linux
kernel upstream.
• Mellanox
– July 2015
• Broadcom
– Feb 2015
23. Verizon
• Network Architecture team
• The division runs several data centers in
the United States
• Problems
– user-space network-configuration tools
provided by most switch vendors,
25. Verizon
• The proprietary CLI tools do not make it
easy to automate operations
– NetDevOps
• The switch vendors are typically reluctant
to make programmatic interfaces to their
tools