-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Port Breakout High Level Design
Rev | Date | Author | Change Description |
---|---|---|---|
0.1 | Volodymyr Samotiy | Initial version | |
0.2 | Volodymyr Samotiy | Update according to comments |
This document provides general information about the Port Breakout feature implementation in SONiC.
This document describes the high level design of the Port Breakout feature.
Definitions/Abbreviation | Description |
---|---|
API | Application Programmable Interface |
SAI | Swich Abstraction Interface |
JSON | JavaScript Object Notation |
Following diagram describes a top level overview of the SONiC Switch components:
Reads prepared json-files with configuration and injects it into App DB.
Located in the Redis DB instance #0 running inside the container "database". Redis DB works with the data in format of key-value tuples, needs no predefined schema and can hold various types of data.
This component is running in the "orchagent" docker container and is resdponsible for processing updates of the App DB and do corresponding changes in the SAI DB via SAI Redis.
SAI Redis is an implementation of the SAI API which translates API calls into SAI objects which are stored in the SAI DB.
Redis DB instance #1. Holds serialized SAI objects.
Reads SAI DB data (SAI objects) and performs appropriate calls to Switch SAI.
An unified API which represent the switch state as a set of objects. In SONiC represented in two implementations - SAI DB frontend and ASIC SDK wrapper.
Detailed description of the Port Breakout feature is here: Port Breakout and Speed.
Requirements are listed below.
- User needs to provide port_config.ini for different port breakout mode.
- Specify default speed in port_config.ini file for split ports.
- Use the speed attribute in the minigraph to specify the speed of a port.
- Assume that the user needs to restart the SWSS when he needs to change the port breakout mode.
- Use create_port() and remove_port() SAI APIs, so SAI >= v1.0 is required.
- Assume that there is no port breakout in SAI profile by default.
No update is needed to support Port Breakout.
No update is needed to support Port Breakout.
Current implementation parses port_config.ini file and creates new record in AppDB port table with the port_alias and hw_lanes info.
To add support of port breakout feature port_config.ini file should be updated in order to specify default speed for the port. It is needed because create_port() SAI API is used for creating new split port and it requires speed to be specified. So, when new split port will be created in HW, specified default speed will be set.
PortSyncD implementation also should be updated with the logic to get the speed value from the config file and then set new record in AppDB port table with the additional speed info. So, new record will specify the following info: (port_alias, hw_lanes, port_speed).
Below is an example of port_config.ini file without any changes.
# name lanes
Ethernet0 0,1,2,3
Ethernet4 4,5,6,7
Ethernet8 8,9,10,11
Ethernet12 12,13,14,15
...
Below is an example of new port_config.ini file, which specifies different port breakout modes and default speed values for the split ports.
# name lanes speed
Ethernet0 0,1 50000
Ethernet1 2,3 50000
Ethernet4 4,5 50000
Ethernet5 6 25000
Ethernet6 7 25000
Ethernet8 8 25000
Ethernet9 9 25000
Ethernet10 10 25000
Ethernet11 11 25000
Ethernet12 12,13,14,15
...
PortsOrch should receive notification from App DB when new port is added with the following info: (port_alias, hw_lanes, port_speed). In class PortsOrch the following logic should be implemented to handle port breakout:
- Check whether received port_alias or hw_lanes are already used.
- If port_alias and hw_lanes are already present then do nothing.
- If port_alias and hw_lanes are used, but with different mapping, then remove found port and create new port with the new hw_lanes.
- Else, just create port with the specified port_alias and hw_lanes.
Port speed SAI attribute is mandatory on port creation, so when create new port, received in AppDB notification speed should be set as a default value. Default speed can be updated by the "Speed" attribute in minigraph configuration.
No update is needed to support Port Breakout.
Listed below SAI APIs should be used to create and delete ports.
- create_port()
- remove_port()
No update is needed to support Port Breakout.
No changes required to support Port Breakout.
No changes required to support Port Breakout.
- Port speed SAI attribute is mandatory on port creation, so what speed should be set by default, minimal supported?
- Do we want to have different speeds on the split ports?
- Minigraph generation procedure sets the same speed for all ports, how to handle in case of split ports?
-
For Users
-
For Developers
-
Subgroups/Working Groups
-
Presentations
-
Join Us