sonic data plane emulation… · leaf1 tor1 server active active tor2 leaf2. title: powerpoint...
TRANSCRIPT
![Page 1: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/1.jpg)
SONiC Data Plane Emulation
Yongfeng Liu
Alibaba
![Page 2: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/2.jpg)
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
![Page 3: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/3.jpg)
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
![Page 4: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/4.jpg)
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
![Page 5: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/5.jpg)
A good example for reference
Relies On …
![Page 6: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/6.jpg)
Purposed practical approach
Network device emulator:
Virtual
Topology
Virtual HW(ASIC)
+
Software Runtime Env
Real
Software
Real
ConfigurationSimulated Traffic
![Page 7: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/7.jpg)
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
![Page 8: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/8.jpg)
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
![Page 9: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/9.jpg)
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
![Page 10: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/10.jpg)
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
![Page 11: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/11.jpg)
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;
![Page 12: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/12.jpg)
Application Scenario I
Daily Development, Testing and Iteration
Online issue reproducing for trouble shooting offline
![Page 13: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/13.jpg)
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
![Page 14: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/14.jpg)
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
![Page 15: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/15.jpg)
Application Scenario IV
Rehearsal Configuration Update and Image Upgrade offline
Configuration Update Human Review Online Execution
Configuration Update Offline Emulation Online ExecutionHuman Review
![Page 16: SONiC Data Plane Emulation… · LEAF1 TOR1 Server Active Active TOR2 LEAF2. Title: PowerPoint Presentation Author: Xin Liu (CLOUD) Created Date: 3/24/2019 9:27:44 PM](https://reader033.vdocuments.us/reader033/viewer/2022060422/5f18903e4d718037c0683136/html5/thumbnails/16.jpg)
Case Study
Online Software UpgradeLEAF1
TOR1
Server
Active Active
TOR2
LEAF2