Skip to content

Commit 1c7313e

Browse files
authored
Merge pull request sonic-net#67 from stevenlu99/master
Add portgroup HLD
2 parents 6c1577d + 68fca1a commit 1c7313e

File tree

1 file changed

+137
-0
lines changed

1 file changed

+137
-0
lines changed

system/portgroup-HLD.md

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Feature Name
2+
Portgroup
3+
# High Level Design Document
4+
#### Rev 0.1
5+
6+
# Table of Contents
7+
* [List of Tables](#list-of-tables)
8+
* [Revision](#revision)
9+
* [About This Manual](#about-this-manual)
10+
* [Scope](#scope)
11+
* [Definition/Abbreviation](#definitionabbreviation)
12+
13+
# List of Tables
14+
[Table 1: Abbreviations](#table-1-abbreviations)
15+
16+
# Revision
17+
| Rev | Date | Author | Change Description |
18+
|:---:|:-----------:|:------------------:|-----------------------------------|
19+
| 0.1 | 08/11/2020 | Steven Lu | Initial version |
20+
21+
# About this Manual
22+
This document provides general information about the portgroup feature implementation in SONiC.
23+
24+
# Scope
25+
This document describes the high level design of portgroup feature.
26+
27+
# Definition/Abbreviation
28+
29+
### Table 1: Abbreviations
30+
| **Term** | **Meaning** |
31+
|--------------------------|-------------------------------------|
32+
| | |
33+
34+
# 1 Feature Overview
35+
Some platforms have limitation that certain ports have to be setup at same speed together. The ports for which the speed has to be set together are grouped into multiple port groups, for the platforms that have this limitation. The portgroup configuration command can be used to configure speed of ports in same portgroup, and interface configuration command will not able to use.
36+
37+
38+
## 1.1 Requirements
39+
40+
### 1.1.1 Functional Requirements
41+
- User shall be able to configure a group of ports' speed together using portgroup command
42+
- User shall be able to display which ports belong to a portgroup
43+
- User shall be able to configure "mixed" speed within a portgroup if silicon allows.
44+
45+
46+
## 1.2 Design Overview
47+
### 1.2.1 Basic Approach
48+
Add "port-group" section in platform-def.json file to define portgroup member ports and speed capabilties.
49+
The front-end CLI need check against "port-group" section in platform-def.json to determine which speed is allowed in the portgroup it current platform has portgroup define. And reject speeds not supported in the portgroup.
50+
51+
52+
# 3 Design
53+
## 3.1 Overview
54+
For platforms need portgroup. Section "port-group" need added to platform-def.json file to define portgroup information.
55+
56+
```
57+
"port-group": {
58+
"1": {
59+
"members": "Ethernet0-11",
60+
"valid_speeds": ["25000",["10000","1000"]]
61+
},
62+
"2": {
63+
"members": "Ethernet12-23",
64+
"valid_speeds": ["25000",["10000","1000"]]
65+
},
66+
"3": {
67+
"members": "Ethernet24-35",
68+
"valid_speeds": ["25000",["10000","1000"]]
69+
},
70+
"4": {
71+
"members": "Ethernet36-47",
72+
"valid_speeds": ["25000",["10000","1000"]]
73+
}
74+
}
75+
```
76+
In "port-group" section, it defines:
77+
- each portgroup
78+
- member ports belong to a portgroup
79+
member ports can be list individualy like
80+
```
81+
"Ethernet0,Ethernet1,Ethernet3,Etherne4"
82+
```
83+
or use range like
84+
```
85+
"Ethernet36-47"
86+
```
87+
- valid speeds of each portgroup.
88+
"valid_speeds" lists valid speeds in a list like
89+
```
90+
["speed1","speed2",...]
91+
```
92+
If there are cases that "mixed" speed can be supported, it can be nested like below:
93+
```
94+
["speed1", ["speed2", "speed3"]]
95+
```
96+
it means that this portgroup can be switched to speed1 and speed2. And when in speed2, individual port speed can be changed to speed3.
97+
98+
## 3.2 User Interface
99+
### 3.2.1 CLI
100+
#### 3.2.1.1 Configuration Commands
101+
This command configures portgroup speed.
102+
- Usage:
103+
config portgroup speed <portgroup> <speed>
104+
105+
- Example:
106+
```
107+
admin@sonic:~$ sudo config portgroup speed 1 10000
108+
Config portgroup 1 speed 10000
109+
```
110+
111+
#### 3.2.1.2 Show Commands
112+
113+
This command displays portgroup information of current platform. It displays each portgroup in current platform and ports belong to each portgroup and valid speeds for each portgroup.
114+
115+
- Usage:
116+
show portgroup
117+
118+
- Example:
119+
For platform does not have portgroup
120+
```
121+
admin@sonic:~/logs$ show portgroup
122+
Platform does not support portgroup.
123+
```
124+
125+
For platform does have portgroup
126+
```
127+
admin@sonic:~$ show portgroup
128+
portgroup ports valid speeds
129+
----------- ------------- --------------------
130+
1 Ethernet0-11 25000, [10000, 1000]
131+
2 Ethernet12-23 25000, [10000, 1000]
132+
3 Ethernet24-35 25000, [10000, 1000]
133+
4 Ethernet36-47 25000, [10000, 1000]
134+
```
135+
25000, [10000, 1000] means that port group support 25000, 10000 and 1000 speeds.
136+
[10000, 1000] means individual ports within that portgroup can change speed between 10000/1000 using 'config interface speed' command.
137+

0 commit comments

Comments
 (0)