View
1
Download
0
Category
Preview:
Citation preview
SONiC Data Plane Emulation
Yongfeng Liu
Alibaba
Scope of switch NOS development
DevOps
ProtocolStack
MgmtApp
ASIC
Performance
Reliability
Scale
Hardware
Topology
CPLD/FPGA
gRPC
AliBGP/TeamD
SAI
BMC
PHY/Gearboxdriver
Transceiver
Fan/PSU/LED
Protocol Compliance
Kernel
SDK
openBMC
Platform Software
SNMP CLI
SWSS
Table Resource
Throughput
Latency
QoS
Physical LinkMemory Leak
HW issue
Failover SLA
Exception Handling
Monitoring
Trouble Shooting
SoftwareIteration
Outage Isolation
Configuration Schema
Warm Reboot
Flow Control
Regular flow for testing and deployment
Offline testing
Production deployment
Unit TestIntegration
Test
Testbed
Regression
Cluster
Regression
Lab TestingPilot
Deployment
Massive
Deployment
Reduce risk through staged deployment and fast iteration
Software works differently at different scales
Ideal production testing model:
Realistic production environment based on …
Real
TopologyReal
Hardware (ASIC)Real
Software
Real
Configuration
Real
Traffic Model
While, to duplicate production environment is IMPORSSIBLE and NOT NECESSARY
A good example for reference
Relies On …
Purposed practical approach
Network device emulator:
Virtual
Topology
Virtual HW(ASIC)
+
Software Runtime Env
Real
Software
Real
ConfigurationSimulated Traffic
SONiC Dataplane Emulation Overview
br-pw ovs bridge
vsonic
...
vsonic
...
vsonic
...
vsonic
...
...server
VM
...
server
VM
...
...
spine1 spineN
leaf1 leafN
ToR1 ToR2 ToRN-1 ToRN
server
VM
server
VM
server
VM
server
VM
...
...
...
...
physical view of virtual topology
logical view of virtual topologyvtopo
set up virtual topology
pod meta-configuration
meshflow
generate and monitor
traffic among servers
management bridge
optional flow configuration
Virtual Topology
vTopo▪ Topology generation、Instances connection
▪ Topology generation based on POD meta-configuration (No. of nodes and base IP address), build connection between instances and apply configrations;
▪ Virtual links between vSONiC and vServer is connected through OVS based match-action rules;
▪ Virtual device lifecycle managment▪ parse_config, ▪ setup_connection, teardown_connection▪ config_vSONiC▪ start_VM, shutdown_VM, destropy_VM
Virtual Hardware (vASIC)
vASIC – ASIC Behavior Model
P4Dataplane threads for
packet processing
Dataplane Runtime
SAI API adaption layer
P4 source code
BMv2 ASIC Model Emulated Front Panel
Ports
Dataplane threads for
packet processing
Dataplane SDK
SAI API implementation
Emulated Front Panel
Ports
P4 bmv2 based ASIC model Vendor specific ASIC model like BCMSIM
Virtual Software Runtime Environment
Enable dataplane emulation with SONiCvirtualization
BGP container lldp container teamd container
swss container
syncd
SAI/SDK
Behaviour model
kernel
Ethernet
1
Ethernet
2
Ethernet
3Ethernet
4
CONFIG_DB/APP_DB/SAI
_DB
fp0 fp1 fp2 fp3
Simulated Traffic
Meshflow
Data plane Traffic generator and analyzer;
Generation full mesh traffic across all virtual nodes according to POD meta-configurationinfo;
Statistical info gathering and monitoring;
Application Scenario I
Daily Development, Testing and Iteration
Online issue reproducing for trouble shooting offline
Application Scenario II
Full image testbed regressionbr-pw ovs bridge
vsonic
...
vsonic
...
vsonic
...
vsonic
...
...server
VM
...
server
VM
...
...
spine1 spineN
leaf1 leafN
ToR1 ToR2 ToRN-1 ToRN
server
VM
server
VM
server
VM
server
VM
...
...
...
...
physical view
logical view
management bridge
All in one server
Physical test bed
Application Scenario III
SAI testing for multi-vendor ASIC
ASIC behavior model
SAI golden reference
Control
Plane
Software
Stack
SWSS
Switch ASIC vendor A
LibSAI vendor A
Control
Plane
Software
Stack
SWSS
Switch ASIC vendor B
LibSAI vendor B
Control
Plane
Software
Stack
SWSS
Application Scenario IV
Rehearsal Configuration Update and Image Upgrade offline
Configuration Update Human Review Online Execution
Configuration Update Offline Emulation Online ExecutionHuman Review
Case Study
Online Software UpgradeLEAF1
TOR1
Server
Active Active
TOR2
LEAF2
Recommended