You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support shared headroom pool on top of dynamic buffer calculation (sonic-net#1348)
**- What I did**
Support shared headroom pool on top of dynamic buffer calculation.
Signed-off-by: Stephen Sun <[email protected]>
**- How I did it**
1. Introduce new commands for shared headroom pool configuration.
- config buffer shared-headroom-pool over-subscribe-ratio
- config buffer shared-headroom-pool size
Shared headroom pool can be enabled by configuring either over-subscribe-ratio or size.
In case both configured, the size will take effect.
The following existing commands has been updated accordingly:
- config buffer profile
2. Update db_migrator:
- Port version 1.0.5 from 201911 branch
- Port the main logic of Mellanox buffer migrator from 201911
- Add unit test infra for Mellanox buffer migrator
3. Command "config qos clear/reload" has been updated with tables for dynamic buffer calculation cleared as well
**- How to verify it**
Run unit test and regression test.
Copy file name to clipboardExpand all lines: doc/Command-Reference.md
+42-8
Original file line number
Diff line number
Diff line change
@@ -2363,25 +2363,53 @@ Dynamic buffer management is responsible for calculating buffer size according t
2363
2363
2364
2364
### Configuration commands
2365
2365
2366
+
**configure shared headroom pool**
2367
+
2368
+
This command is used to configure the shared headroom pool. The shared headroom pool can be enabled in the following ways:
2369
+
2370
+
- Configure the over subscribe ratio. In this case, the size of shared headroom pool is calculated as the accumulative xoff of all of the lossless PG divided by the over subscribe ratio.
2371
+
- Configure the size.
2372
+
2373
+
In case both of the above parameters have been configured, the `size` will take effect. To disable shared headroom pool, configure both parameters to zero.
All the parameters are devided to two groups, one for headroom and one for dynamic_th. For any command at lease one group of parameters should be provided.
2379
2404
For headroom parameters:
2380
2405
2381
-
- At lease one of `xoff` and `size` should be provided and the other will be optional and conducted via the formula `xon + xoff = size`.
2382
-
All other parameters are optional.
2383
2406
- `xon` is madantory.
2384
-
- `xon` + `xoff` <= `size`; For Mellanox platform xon + xoff == size
2407
+
- If shared headroom pool is disabled:
2408
+
- At lease one of `xoff` and `size` should be provided and the other will be optional and conducted via the formula `xon + xoff = size`.
2409
+
- `xon` + `xoff` <= `size`; For Mellanox platform xon + xoff == size
2410
+
- If shared headroom pool is enabled:
2411
+
- `xoff` should be provided.
2412
+
- `size` = `xoff` if it is not provided.
2385
2413
2386
2414
If only headroom parameters are provided, the `dynamic_th` will be taken from `CONFIG_DB.DEFAULT_LOSSLESS_BUFFER_PARAMETER.default_dynamic_th`.
2387
2415
@@ -2397,8 +2425,8 @@ This command is used to configure a lossless buffer profile.
0 commit comments