Skip to content

Commit 7a90ec3

Browse files
authored
Merge pull request sonic-net#193 from stevenlu99/intf-dampening
Add detailed design for Link-Err-Disable
2 parents 048f633 + 1ff6fe0 commit 7a90ec3

File tree

1 file changed

+113
-3
lines changed

1 file changed

+113
-3
lines changed

system/intf-dampening-HLD.md

+113-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Port Link Flap Error Disable
1818
|:---:|:-----------:|:------------------:|------------------------------------------------------|
1919
| 0.1 | 04/14/2021 | Steven Lu | Initial version for requirements |
2020
| 0.2 | 04/20/2021 | Steven Lu | Change feature name to Port Link Flap Error Disable |
21+
| 0.3 | 05/11/2021 | Steven Lu | Add design details |
2122

2223
# About this Manual
2324
This document provides general information about the Port Link Flap Error Disable feature implementation in SONiC.
@@ -63,13 +64,14 @@ Specifies the amount of time in seconds, for which the port remains disabled (do
6364
### 1.1.2 Configuration and Management Requirements
6465
- Port Link Flap Error Disable feature default is OFF on all physical interfaces and port-channels
6566
- When Port Link Flap Error Disable is enabled, use below default values:
66-
sample-interval: TBD
67-
toggle-frequency: TBD
68-
waiting-period: TBD
67+
sample-interval: 10
68+
toggle-frequency: 3
69+
waiting-period: 30
6970
- User shall be able to specify different sample-interval, toggle-frequency and waiting-period on a physical interface
7071
- User shall be able to display current Port Link Flap Error Disable confiuration values.
7172
- User shall be able to display current interface status if it was surpresed by Port Link Flap Error Disable
7273
- User shall be able to display Link-Down-Reason if a port is disabled by Port Link Flap Error Disable feature
74+
- When port is supressed or released by Error Disable, shall be logged in syslog.
7375

7476

7577
### 1.1.3 Scalability Requirements
@@ -80,3 +82,111 @@ Port Link Flap Error Disable must be supported on all physcial ports. All the pl
8082
Interfaces that are configured Port Link Flap Error Disable must be retained across warmboot.
8183

8284

85+
## 1.2 Design Overview
86+
### 1.2.1 Basic Approach
87+
The Interface Error Disable feature is base on SONiC code base and architecture.
88+
89+
### 1.2.2 Modules and Containers
90+
The Interface Error Disable feature exist in below modules and containers:
91+
1. syncd/SAI
92+
2. swss/orchagentd, portmgrd, portsyncd
93+
3. mgmt-framework
94+
4. click
95+
96+
97+
# 2 Functionality
98+
## 2.1 CLI
99+
100+
101+
# 2.2 Functional Description
102+
103+
# 3 Design
104+
## 3.1 Overview
105+
## 3.2 DB Changes
106+
### 3.2.1 CONFIG DB
107+
For individual physcial interface
108+
"PORT|Ethernet124":
109+
{
110+
"error-disable": "on|off",
111+
"toggle-frequency": "3",
112+
"sampling-interval": "5",
113+
"wait-time-period": "10"
114+
},
115+
116+
### 3.2.2 APP DB
117+
For individual physcial interface
118+
"PORT_TABLE|Ethernet124":
119+
{
120+
"error-disable": "on|off",
121+
"toggle-frequency": "3",
122+
"sampling-interval": "5",
123+
"wait-time-period": "10"
124+
},
125+
126+
To surpress interface:
127+
"PORT_APP_STATUS_TABLE:Ethernet0" :
128+
{
129+
"err_disable_status": "up|down"
130+
}
131+
132+
133+
### 3.2.3 STATE DB
134+
Record number of link flaps within sampling-interval:
135+
"PORT_ERR_DISABLE_TABLE|Ethernet0" :
136+
{
137+
"start-time": time,
138+
"link-flaps" :counts,
139+
"supress-time": time,
140+
141+
"error-disable": "on|off",
142+
"toggle-frequency": "3",
143+
"sampling-interval": "5",
144+
"wait-time-period": "10"
145+
}
146+
147+
### 3.2.4 ASIC DB
148+
### 3.2.5 COUNTER DB
149+
150+
## 3.3 Switch State Service Design
151+
### 3.3.1 mgmt-framework/CLI
152+
mgmt-framwrok process CLI inputs and populate Interface Error Disable configurations into CONFIG_DB
153+
154+
### 3.3.2 portmgr
155+
portmgr listens on CONFIG_DB and process Interface Error Disable configurations and produce in APP_DB
156+
157+
### 3.3.3 Orchestration Agent
158+
orchagent listerns APP_DB and produces Interface Error Disable configurations in STATE_DB.
159+
orchagent monitors link events and update PORT_ERR_DISABLE_TABLE in STATE_DB
160+
orchagent takes action if surpress or re-enable port if criteria meet.
161+
162+
## 3.4 SyncD
163+
synd reports link events to swss and enable/disbale ports base on requests from swss.
164+
165+
## 3.5 SAI
166+
167+
## 3.6 User Interface
168+
### 3.6.1 Data Models
169+
Can be reference to YANG if applicable. Also cover gNMI here.
170+
171+
### 3.6.2 CLI
172+
Refer to Functionality
173+
174+
### 3.6.3 REST API Support
175+
### 3.6.4 Service and Docker Management
176+
No new service ot docker introduced
177+
178+
# 4 Error Handling
179+
180+
181+
# 5 Serviceability and Debug
182+
syslog recrods Interface Error Disable configuration changes and link enable/disable triggered by Interface Error Disable
183+
184+
# 7 Warm Boot Support
185+
Interface Error Disable configurations remain same cross warm-reboot
186+
187+
# 8 Scalability
188+
189+
# 9 Unit Test
190+
191+
# 10 Internal Design Information
192+

0 commit comments

Comments
 (0)