Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Control Your Network ASICs, What Benefits switchdev Can Bring Us

35 views

Published on

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.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Control Your Network ASICs, What Benefits switchdev Can Bring Us

  1. 1. Control Your Network ASICs, What Benefits Switchdev Can Bring Us Hung-Wei Chiu(hwchiu)
  2. 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. 3. Outline • Why We Need the Switchdev • How Switchdev Works • Example Cases
  4. 4. What’s the Problem ?
  5. 5. From the SDN • SDN definition (From ONF) – DIRECTLY PROGRAMMABLE – AGILE – CENTRALLY MANAGED – PROGRAMMATICALLY CONFIGURED – OPEN STANDARDS-BASED AND VENDOR- NEUTRAL
  6. 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
  7. 7. Example
  8. 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. 9. Home Router • 5 ports (wan + lan) • Only two ports in the linux system. https://www.smallnetbuilder.com/wireless/wireless-reviews
  10. 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. 11. Example WAN LAN 1 LAN 2 LAN 3 LAN 4 Without CPUWith Main CPU Hardware Board
  12. 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. 13. What We Want Can we use the common tools to control those ports ?
  14. 14. What We Want That’s what switchdev want to solve
  15. 15. How It Solves
  16. 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. 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. 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
  19. 19. Features • Port topology – Bonding – Bridge • Port status – PHY link state – I/O statistics
  20. 20. Features • L2 forwarding offload – FDB – STP – Vlan • L3 routing offload – FIB – Multicast
  21. 21. Significant Does anybody accept switchdev ?
  22. 22. Vendors • Vendor should implement its driver based on the switchdev and contribute to linux kernel upstream. • Mellanox – July 2015 • Broadcom – Feb 2015
  23. 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,
  24. 24. Verizon Several dozen switches that each require a separate CLI application for management becomes a support nightmare
  25. 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
  26. 26. Cases
  27. 27. SRIOV • Single-root I/O virtualization • Legacy mode • Switchdev mode – Implemented by different vendor
  28. 28. Legacy Mode VM1 VM2 VM3 SR-IOV Embedded Switch VF VF VF Driver VF Driver VNIC VM4 VNIC Software Switch NIC Linux Host
  29. 29. Switchdev Mode VM1 VM2 VM3 SR-IOV Embedded Switch VF VF VF Driver VF Driver VNIC VM4 VNIC Software Switch NIC Linux Host VF Representor VF Representor
  30. 30. Summary Reference: http://www.mellanox.com/page/products_dyn?product_family=262&mtag=Spectrum%20Linux%20Switch

×