[Dynamic buffer] Fix max speed issue when there are 8 lanes #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of PR
Summary:
For spectrum 4 and spectrum 3 with 8 lanes, the max speed is different.
In the old code, the max speed is a fixed value(400G). So, update code to get max speed by platform.
For 8-lane ports, the name convention of the buffer profile generated for the port should be
More background info:
The ways to calculate lossless profiles differ between 8-lane ports and other ports, i.e., a 200G 4-lane port and a 200G 8-lane port can not share the same buffer profile. However, the traditional buffer profile name convention hadn't provided information to distinguish both cases. The tag 8lane was introduced for non-highest speeds. We need to check whether the speed is the highest one when generating the name of the expected buffer profile on a port.
Originally, there is only one highest speed which was hard-coded. Now there are two, so we designate it in the pre-define json file.
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix the issue max speed is not correct for spc4
How did you do it?
Get max speed by platform.
How did you verify/test it?
Run test/test_buffer.py
Any platform specific information?
x86_64-mlnx_msn4410-r0
x86_64-mlnx_msn4700-r0
x86_64-mlnx_msn4700_simx-r0
x86_64-nvidia_sn4800-r0
x86_64-nvidia_sn4800_simx-r0
x86_64-nvidia_sn5600-r0
x86_64-nvidia_sn5600_simx-r0
Supported testbed topology if it's a new test case?
Documentation