Commit 5fa2329
authored
Support shared headroom pool on top of dynamic buffer calculation (#1581)
* Support shared headroom pool on top of dynamic buffer calculation
- Feature is enabled/disabled on-the-fly by configuring over-subscribe-ration and shared headroom pool size.
If both are configured, the shared headroom pool size will take effect.
When turn on/off the feature, all the lossless profiles and buffer pool size will be recalculated.
- Support calculating shared headroom pool while ingress lossless pool is statically configured.
- Check accumulative headroom before toggling SHP state
To disable SHP results in size of PG increasing.
Hence needs to check whether accumulative headroom exceed limit
- Split the function doUpdateStaticProfileTask into two functions
Originally it was called for static profile only and consisted of two parts:
- One is for dynamic th updated. It will go over all the buffer profiles
dynamically generated according to the dynamic th and update them
- The other is for size updated. It will go over each port referencing
the profile and check whether the accumulative headroom exceeds limit
Now that it is also called by shared headroom pool, we split it into
two functions to make it more clear
Signed-off-by: Stephen Sun <[email protected]>
How I verified it
Run vs test and regression test.1 parent 1438a70 commit 5fa2329
File tree
5 files changed
+465
-37
lines changed- cfgmgr
- tests
5 files changed
+465
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
76 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
77 | 89 | | |
78 | 90 | | |
79 | 91 | | |
| |||
119 | 131 | | |
120 | 132 | | |
121 | 133 | | |
122 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
86 | 104 | | |
87 | 105 | | |
88 | 106 | | |
| |||
103 | 121 | | |
104 | 122 | | |
105 | 123 | | |
| 124 | + | |
106 | 125 | | |
107 | 126 | | |
108 | 127 | | |
| |||
114 | 133 | | |
115 | 134 | | |
116 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
117 | 143 | | |
118 | 144 | | |
119 | 145 | | |
| |||
138 | 164 | | |
139 | 165 | | |
140 | 166 | | |
141 | | - | |
| 167 | + | |
142 | 168 | | |
143 | 169 | | |
144 | 170 | | |
| |||
149 | 175 | | |
150 | 176 | | |
151 | 177 | | |
| 178 | + | |
152 | 179 | | |
153 | 180 | | |
154 | 181 | | |
155 | 182 | | |
156 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
157 | 188 | | |
158 | 189 | | |
159 | 190 | | |
| |||
165 | 196 | | |
166 | 197 | | |
167 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
168 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
169 | 207 | | |
170 | 208 | | |
171 | 209 | | |
| |||
176 | 214 | | |
177 | 215 | | |
178 | 216 | | |
| 217 | + | |
179 | 218 | | |
180 | 219 | | |
181 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
182 | 230 | | |
183 | 231 | | |
184 | 232 | | |
185 | | - | |
| 233 | + | |
186 | 234 | | |
187 | 235 | | |
188 | 236 | | |
189 | 237 | | |
190 | 238 | | |
191 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
192 | 243 | | |
193 | 244 | | |
0 commit comments