Linux kernel recently leap to 4.x era, at first glance, nothing much action, but for me, the most exciting thing is that it supports the hard switching modules. This is the first step to fully cater to the SDN-ready.
Routing and switching on Linux
Linux was born in the network, born on the network has a comprehensive and strong support, even complex protocols, reclosable technology, almost all can be found in the corresponding Linux implementation. However, this does not mean that Linux network is invincible, it exists many unreasonable.
Linux has a strong support for routing, data plane, you can easily implement a routing lookup algorithm, the control plane, you can achieve any existing or your own design routing protocol in user mode, however, everything is soft, that is, the CPU is completed.
When we know the difference between routing and switching, you will find, Linux has been no real exchange, at least not a reasonable solution on a common interface level. The Linux bridge module? Come on, it's just to achieve a soft bridges, and switches do not really detached.
Linux support for hardware exchange
I remember last year when I had to get over a switching board can be directly plugged into the motherboard's PCI-E, then you must use vendor-specific drivers and with VLAN technology can be used up. In fact, many of the switches may have adopted Linux as the management and control planes, and then configure your own custom hardware and custom drivers to use.
I have thought of a way to implement support for hardware switching module with Netfilter technology, however, the CPU is to be interrupted, the entire process is CPU packet pulled bridge or IP layer, and then returned to the correct hardware ... is the fundamental way without interrupting the CPU, to forward packets entirely in hardware, and only when the data relevant to the local protocol stack, only interrupt the CPU. And this idea, which means you have to rewrite drivers.
In short, there is no a unified interface, which means that if you want to design a switching board, there is no good standard to follow, even if there is, you may have to write or copy and paste a lot of driving their own code, which will seriously affect R & D efficiency.
Linux 4.0's switchdev
All the bad news at the end of the Linux 4.0 kernel.
Linux 4.0 introduces a switchdev framework, which represents an abstract class has "swap" capability of multi-chip network interface device. Wherein each network port is a port, it is registered in switchdev frame into a net_device. In addition, the kernel comes with a rocker driver, it demonstrates an actual device driver implementation.
Note idealized implementation, OpenFlow controller can be directly injected into the flow table apparatus, in order to guide the device directly for packet switching. Table of content streams super complicated, the goal of this article is not, but I believe in a kernel version will appear in the relevant Document.
Using a hardware switch module Linux BOX original and different, and it is more like a high-end professional network equipment, similar to that of Cisco.