@@ -18,6 +18,7 @@ Port Link Flap Error Disable
18
18
| :---:| :-----------:| :------------------:| ------------------------------------------------------|
19
19
| 0.1 | 04/14/2021 | Steven Lu | Initial version for requirements |
20
20
| 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 |
21
22
22
23
# About this Manual
23
24
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
63
64
### 1.1.2 Configuration and Management Requirements
64
65
- Port Link Flap Error Disable feature default is OFF on all physical interfaces and port-channels
65
66
- 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
69
70
- User shall be able to specify different sample-interval, toggle-frequency and waiting-period on a physical interface
70
71
- User shall be able to display current Port Link Flap Error Disable confiuration values.
71
72
- User shall be able to display current interface status if it was surpresed by Port Link Flap Error Disable
72
73
- 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.
73
75
74
76
75
77
### 1.1.3 Scalability Requirements
@@ -80,3 +82,111 @@ Port Link Flap Error Disable must be supported on all physcial ports. All the pl
80
82
Interfaces that are configured Port Link Flap Error Disable must be retained across warmboot.
81
83
82
84
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