Commit 189a964
authored
[buffermgr] Support maximum port headroom checking (sonic-net#1607)
* Support maximum port headroom checking
- Fetch the maximum port headroom via fetching the port attribute SAI_PORT_ATTR_QOS_MAXIMUM_HEADROOM_SIZE when the orchagent starts and push the data into STATE_DB
- Check the accumulative port headroom against the maximum headroom in buffer_check_headroom_<vendor>.lua
On Mellanox platform, this PR depends on PR #6566 to be merged. In that PR the required SAI attribute is supported.
On other platforms, there is no dependency.
Signed-off-by: Stephen Sun [email protected]
Why I did it
On some platforms, the SAI will notify orchagent shut down if a headroom size that causes the accumulative port headroom to exceed its limit is programmed to SAI.
To avoid that, we need to check this before programming it to SAI.
How I verified it
Run the regression test.1 parent 5fa2329 commit 189a964
4 files changed
Lines changed: 29 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | | - | |
23 | 20 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 21 | + | |
43 | 22 | | |
44 | 23 | | |
45 | 24 | | |
| |||
67 | 46 | | |
68 | 47 | | |
69 | 48 | | |
70 | | - | |
71 | 49 | | |
72 | 50 | | |
73 | 51 | | |
| |||
119 | 97 | | |
120 | 98 | | |
121 | 99 | | |
| 100 | + | |
122 | 101 | | |
123 | 102 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 103 | | |
128 | 104 | | |
129 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
| |||
3291 | 3294 | | |
3292 | 3295 | | |
3293 | 3296 | | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
3294 | 3316 | | |
3295 | 3317 | | |
3296 | 3318 | | |
| |||
3299 | 3321 | | |
3300 | 3322 | | |
3301 | 3323 | | |
| 3324 | + | |
3302 | 3325 | | |
3303 | 3326 | | |
3304 | 3327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
| |||
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
0 commit comments