Skip to content

[Dynamic buffer] Fix max speed issue when there are 8 lanes - #18

Open
JibinBao wants to merge 1 commit into
masterfrom
fix_dynamic_buf_lane_issue
Open

[Dynamic buffer] Fix max speed issue when there are 8 lanes#18
JibinBao wants to merge 1 commit into
masterfrom
fix_dynamic_buf_lane_issue

Conversation

@JibinBao

@JibinBao JibinBao commented Mar 17, 2022

Copy link
Copy Markdown
Owner

Description of PR

Summary:
For spectrum 4 and spectrum 3 with 8 lanes, the max speed is different.

  • On spectrum 4 with 8 lanes the max speed is 800G
  • On spectrum 3 with 8 lanes the max speed is 400G

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

pg_lossless_<speed>_<cable-length>_profile if the port runs at the highest speed,
pg_lossless_<speed>_<cable-length>_8lane_profile otherwise

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

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012

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

On spc4 for 8 lane the max speed is 800G, so update code to get max speed by platform.
@JibinBao JibinBao changed the title Fix dynamic buffer test bug for spc4 [Dynamic buffer calc] Fix 2 issues in dynamic buffer calculation test Mar 17, 2022
@stephenxs

Copy link
Copy Markdown

LGTM but let's provide more background info like this

For 8-lane ports, the name convention of the buffer profile generated for the port should be

  • pg_lossless_<speed>_<cable-length>_profile if the port runs at the highest speed,
  • pg_lossless_<speed>_<cable-length>_8lane_profile otherwise

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.

@JibinBao JibinBao changed the title [Dynamic buffer calc] Fix 2 issues in dynamic buffer calculation test [Dynamic buffer] Fix max speed issue when there are 8 lanes Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants