Switch Abstraction Interface (SAI)
Transcript of Switch Abstraction Interface (SAI)
Switch Abstraction Interface (SAI)
SAI Contributors
Momentum, Timeline
V0.9.0
December 2014
• Supporting Companies (Dell, Mellanox, Microsoft, Broadcom, Facebook, Intel)
• 1st proposal
V0.9.1
December 2015
• Contributors (Dell, Mellanox, Microsoft)
• 7 proposals
• Versioning, Upstreaming, Pull requests
• First Demo!
V0.9.2
March 2015
• Contributors (Dell, Mellanox, Microsoft, Broadcom)
• 15+ proposals
• Possible deployment
V0.9.3
October 2015
• Contributors (Dell, Mellanox, Microsoft, Broadcom, Cavium, Barefoot, Metaswitch
• 20+ proposals covering a broad range of proprietary ASIC architecture.
• Official acceptance into OCP, Official GitHub
V0.9.4
March 2015
• Contributors (Dell, Mellanox, Microsoft, Broadcom, Cavium, Barefoot, Metaswitch, Centec)
• Proposals with QoS, Warm Reboot, and Unified Tunneling
• Python Test Framework (PTF)
• SAI logical pipeline
Momentum, Demos & Deployment
1st Demo
• March 2015 OCP Summit
• 4 contributors
• Basic Router functionality
2nd Demo
• August SIGCOMM
• 7 Contributors
• Extended functionality like QoS, ACL, etc.
Prod• October Microsoft, SAI v.0.9.3
3rd Demo
• March 2016 OCP Summit
• 8 contributors
• 4 different NOS, 5 different ASICs, 5 different switching platforms, 1 SAI implementation
Technical Merit, Architectural philosophy
Does it define a pipeline/behavioral model?
Do we need to read an ASIC user manual?
Feature IS SAI CONFORMANT
Can we write a conformance test for it?
Can we run any generic application on it?
SAI keeps momentum
â–Ş Increasing in number of contributors
â–Ş Increasing in number of proposals
â–Ş~ 3 releases a year
â–ŞHeading towards testing compliancy
â–ŞWorking on a logical pipeline
Software for Open Networking in the Cloud (SONiC)
SONiC Contributors
3/8/2016
OCP Networking Landscape
SAI
Hardware
Components
Packet Forwarding
Chip
(ASIC)
SONiC
OCP Hardware
Open Network Linux
ONIE
Software
Networking
Components
Switch State
Service
SONiC and the OCP Stack
IS
SW components for building network switch
functions
100% Open Sourced
OCP community supported
Deployed in a Microsoft datacenter
IS NOT
A Linux distribution
Hardware components
Just prototyped software
SONiC
Network Switch
ASICs
Network Switch
Hardware
Base OS and
installer
Interoperability
certified by
OCP
Solution
Providers (SPs)
OCP SW
components
3rd Party SW
components
BYO custom
SW components
SAI compatible
OCP approved
ONIE, ONL
Fully Open Sourced switching platform - Increased choices for OCP end users
SONiC framework
OCP Ecosystem Enhanced with SONiC
What Is SONiC
•Builds on the foundations of SAI
•Provides L2/L3 functionalities
•Loosely-coupled modular design
•Separation of states and logic
A collection of software components/tools
•Shared on GitHub, Apache License
•Believe in working code + quick iteration
Community driven, open source effort
What can SONiC enable?
Building complete and production-ready stack
•ASICs (through SAI)
•Platform (Arista 7050QX, Dell S6000, Mellanox Spectrum, ongoing with
ONL)
•Base Linux Distribution (Debian/Ubuntu/ONL)
Easy portability
• for both prototype and production
Fast evolution
SONiC High Level Architecture
Chassis
Supplier
ASIC
Supplier
Linux
OCP
Various
ASIC
Switch Hardware
TransceiverFan/Power/LED
Network Applications
ASIC SDK
SAI
Ke
rne
lU
se
r S
pace
Switch State Service
Network
device drivers
netdevASIC PCI driver
HW Peripheral
drivers
PAL - sysfs
SDI
PAS
Object Library
Object Library
Linux
Switch State Service (SSS)
APP
DB
SAI DB Obje
ct
Lib
rary
w/
Redis
Backen
d
ASIC
SAI
Network
Applications
SyncD
Orchestration Agent
SAI DB: persist SAI objects
App DB: persist App objects
DB backend: redis with object library
SyncD: sync SAI objects between software and hardware
Orchestration Agent: translation between apps and SAI objects, resolution of dependency and conflict
Key Goal: Evolve components independently
How Routing Works in SONiC
APP
DB
SAI DB
SyncD
Orchestration Agent
ASIC
Transceivers
Host Intf
netdev
BGP
NeighborZebraBGPd
socket
SAI Route
SAI Redis
teamsyncd
APP
DB
SAI DB
SyncD
Orchestration Agent
ASIC
Transceivers
Host Intf
netdev
LACP
NeighborteamD
socket
SAI lag
How LAG Works in SONiC
teamD
netdev
SAI Redis
teamsyncd
â–Ş PAS is implemented as daemon (PAS daemon)â–Ş monitor system device health and raises failure events
▪ detects insertion/removal events (fan, PSU’s, transceivers)
â–Ş detects over-temperature events
â–Ş allows applications to control system devices (get/set)
▪ SDI encapsulates and aggregates system devices▪ For instance, the SDI API defines a “fan device entity” with attributes such as:
▪ fan unit presence: implemented in CPLD and accessed through “sysfs”
â–Ş fan speed: fan controller driver used to set/get fan speed (through I2C ioctl calls or sysfs calls, depending on fan controller device implementation)
▪ Implementation details of how “fan device entity” attributes are accessed is encapsulated by SDI API
â–Ş SDI library implementation can use either sysfs/kernel drivers or user space drivers
SONiC Platform Support
SDI Library
HW Peripheral drivers
sysfs
SDI API
PAS Daemon
Object Library API
User Space
Device
Drivers
SONiC Platform Applications
â–Ş Platform Applications â–Ş use the PAS Object Library API to control
(set/get) system devices
â–Ş register for events published by PAS daemon
â–Ş Device Insertion / removal
â–Ş Other events (e.g. over-temperature events, device failures)
For instance, a thermal control (cooling) application can register for “over-temperatureevents and increase (set) fan speed values accordingly. SDI Lib
HW Peripheral drivers
sysfs
SDI API
PAS Daemon
Object Library API
User Space
Device
Drivers
Thermal Control
(Cooling)
Transceiver
Status and Control
LED Control
Demo: SONiC Walk Through
EEPROM
Port Status
TCPDump
Redis
Quagga and FIB
â–Ş What is the real scenario?â–Ş Hot patching
â–Ş Rollout new features, e.g. BMP
â–Ş How is this achieved?1. Neighbor supports graceful restart
2. DUT request OA to freeze FIB
3. DUT uninstalls Quagga
4. DUT installs GoBGP
5. DUT wait for route convergence
6. DUT request OA to unfreeze FIB
Demo: Hitless Quagga to GoBGP Migration
Neighbor
Server 1
Server 2
DUT
Demo at the Microsoft Booth24 U
1 U AALF (DELL S6000)1 U BBLF (MLNX 2700)1 U CCLF (CAVIUM)1 U DDLF (BAREFOOT)1 U EELF (CENTEC)
1 U 01ToR (DELL S6000)1 U 02ToR (MLNX 2700)
1 U Mgmt Switch 48x1G
1 U Host_A (400W)1 U Host_B (400 W)1 U Host_C (400 W)
1 U PTF Controller (400 W)1 U DELL S60001 U MNLX S27001 U CAVIUM1 U CENTEC
2 U DELL S6100
1 U DIGI
1 U BAREFOOT
1 U FFLF (ARISTA)
Feature Functionality Demo
mgmt: 192.168.200.12lo0: 100.0.0.3
mgmt: 192.168.200.13lo0: 100.0.0.4
mgmt: 192.168.200.14lo0: 100.0.0.5
mgmt: 192.168.200.15lo0: 100.0.0.6
.2 .6 .10 .14 .14.10.6.2
10.10.1.0 (/30s)
10.10.2.0 (/30s)
.1.1
.5 .5 .9 .9 .13 .13
Host_A
Host_C
ProtocolStack
SAI
01ToR
mgmt: 192.168.200.10lo0: 100.0.0.1
ProtocolStack
SAI
02ToR
mgmt: 192.168.200.11lo0: 100.0.0.2
10.20.1/24VLAN 851
10.20.2/24VLAN 852
ProtocolStack
SAI
AALFProtocol
Stack
SAI
BBLFProtocol
Stack
SAI
CCLFProtocol
Stack
SAI
DDLF
mgmt: 192.168.200.16lo0: 100.0.0.7
ProtocolStack
SAI
EELF
.17
.17
.18.22 .22
mgmt: 192.168.200.40
mgmt: 192.168.200.42
.2 .6 .10 .14 .14.10.6.2
10.10.1.0 (/30s)
10.10.2.0 (/30s)
.1.1
.5 .5 .9 .9 .13 .13
ProtocolStack
SAI
01ToRProtocol
Stack
SAI
02ToR
ProtocolStack
SAI
AALFProtocol
Stack
SAI
BBLFProtocol
Stack
SAI
CCLFProtocol
Stack
SAI
DDLFProtocol
Stack
SAI
EELF
.17
.17
.18.22
.18
mgmt: 192.168.200.17lo0: 100.0.0.8
ProtocolStack
SAI
EELF
.17
ProtocolStack
SAI
EELF
.21
.17
.21
â–Ş Python based test framework
â–Ş 20+ test cases
â–Ş Working towards compliancy
â–Ş Looking for community participation
â–Ş Future proposals accepted only with PTF test cases
Python Test Framework Demo
4X40G 4x40G 4x40G 4x40G
mgmt: 192.168.200.20
mgmt: 192.168.200.22
mgmt: 192.168.200.21
mgmt: 192.168.200.23
FANOUTDELL S6100
mgmt: 192.168.200.25
SAI
DELL S6000
SAI
CAVIUM
SAI
MLNX
SAI
CENTEC
PTF_controller40G
mgmt: 192.168.200.24
SAI
BAREFOOT
4x40G
mgmt: 192.168.200.1
â–Ş Inviting contributions in all areas â–Ş SAI
â–Ş Hardware platform
â–Ş Base OS platform (Ubuntu/ONL happening)
â–Ş New features and applications
â–Ş Use it!
â–ŞStarting Point: http://azure.github.io/SONiC/
Open Invitation