forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dynamic Buffer Calc][Mellanox] Bug fixes and enhancements for the lu…
…a plugins for buffer pool calculation and headroom checking (sonic-net#1781) What I did Bug fixes for buffer pool calculation and headroom checking on Mellanox platforms. Test the number of lanes instead of the speed when determining whether special handling is required for a port. For speeds other than 400G, eg 100G, it's possible that some 100G ports have 8 lanes and others have 4 lanes, which means they can not share the same buffer profile. A suffix _8lane is introduced to indicate it, like pg_lossless_100000_5m_8lane_profile Take the private headroom into account when calculating the buffer pool size Take deviation into account when checking the headroom against the per-port limit to avoid the inaccurate result in a rare case Use hashtable to record the reference count of a profile in lug plugin Signed-off-by: Stephen Sun stephens@nvidia.com How I verified it Run regression and manually test Details if related Test the number of lanes instead of the speed when determining whether special handling (double headroom size) is required for a port. Originally, it was determined by testing whether the ports' speed is 400G but that is not accurate. A user can configure a port with 8 lanes to 100G. In this case, special handling is still required for a port that is not 400G. So we need to adjust the way to do that. The variable names are also updated accordingly: xxx_400g => xxx_8lanes Take deviation into account when checking the headroom against the per-port limit to avoid the inaccurate result in a rare case There are some deviations that make the accumulative headroom a bit larger than the quantity calculated by the buffer manager. We need to take it into account when calculating the accumulative headroom.
- Loading branch information
Showing
6 changed files
with
190 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.