Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mellanox][202012] Support Mellanox-SN4600C-C64 as T1 switch in dual-ToR scenario #11032

Merged
merged 10 commits into from
Jun 21, 2022

Conversation

stephenxs
Copy link
Collaborator

Why I did it

Support Mellanox-SN4600C-C64 as T1 switch in dual-ToR scenario

  1. Support additional queue and PG in buffer templates, including both traditional and dynamic model
  2. Support mapping DSCP 2/6 to lossless traffic in the QoS template.
  3. Add macros to generate additional lossless PG in the dynamic model
  4. Adjust the order in which the generic/dedicated (with additional lossless queues) macros are checked and called to generate buffer tables in common template buffers_config.j2
    • Buffer tables are rendered via using macros.
    • Both generic and dedicated macros are defined on our platform. Currently, the generic one is called as long as it is defined, which causes the generic one always being called on our platform. To avoid it, the dedicated macrio is checked and called first and then the generic ones.
  5. Support MAP_PFC_PRIORITY_TO_PRIORITY_GROUP on ports with additional lossless queues.

On Mellanox-SN4600C-C64, buffer configuration for t1 is calculated as:

  • 40 * 100G downlink ports with 4 lossless PGs/queues, 1 lossy PG, and 3 lossy queues
  • 16 * 100G uplink ports with 2 lossless PGs/queues, 1 lossy PG, and 5 lossy queues

Signed-off-by: Stephen Sun stephens@nvidia.com

How I did it

How to verify it

Run regression test.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

stephenxs and others added 4 commits June 5, 2022 02:39
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
…ng macro are defined

Move '_with_extra_queue' and 'with_extra_queue_with_inactive_port' version to the beginning.
For some vendors, all versions are defined.
The generic version will be called if it is defined at the beginning

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@bingwang-ms
Copy link
Contributor

https://github.com/Azure/sonic-buildimage/blob/f0f23ebac210777333ca3f6f234317f4e211ff89/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/qos.json.j2#L82
Should it be "7" : "0" or "7" : "7"?
We are using "7" : "7" in current design. But I think "7" : "0" also makes sense. We can save a lossy PG in that way.
@neethajohn What do you think?

@stephenxs
Copy link
Collaborator Author

https://github.com/Azure/sonic-buildimage/blob/f0f23ebac210777333ca3f6f234317f4e211ff89/device/mellanox/x86_64-mlnx_msn4600c-r0/Mellanox-SN4600C-C64/qos.json.j2#L82

Should it be "7" : "0" or "7" : "7"?
We are using "7" : "7" in current design. But I think "7" : "0" also makes sense. We can save a lossy PG in that way.
@neethajohn What do you think?

Yes. We would like to use 7:0 for the purpose of saving a lossy PG and buffers.

It doesn't make sense since both cases result in the same code

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@stephenxs
Copy link
Collaborator Author

/azpw run Azure.sonic-buildimage

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stephenxs
Copy link
Collaborator Author

Looks like it is failing because #11018 was cherry-picked without updating unit test

@liat-grozovik
Copy link
Collaborator

@neethajohn , @bingwang-ms could you please help to review and signoff?

@stephenxs
Copy link
Collaborator Author

stephenxs commented Jun 18, 2022

There should be build issues that are caused by newly introduced commits:

  • global DSCP_TO_TC map, which is not necessary on our platforms. I will fix it by introducing a vendor-specific generate_global_dscp_to_tc_map to avoid generating the global map.
  • additional lossy PGs on T1 uplinks, which is still under discussion and will be an other PR.

- the way to enable dual ToR feature is changed
- global DSCP_TO_TC_MAP

Signed-off-by: Stephen Sun <stephens@nvidia.com>
@neethajohn neethajohn merged commit 307d0e2 into sonic-net:202012 Jun 21, 2022
@stephenxs stephenxs deleted the dual-tor-t1-c64-202012 branch June 21, 2022 22:17
liat-grozovik pushed a commit that referenced this pull request Jul 20, 2022
…ario (#11261)

- Why I did it
Support Mellanox-SN4600C-C64 as T1 switch in dual-ToR scenario
This is to port #11032 and #11299 from 202012 to master.

Support additional queue and PG in buffer templates, including both traditional and dynamic model
Support mapping DSCP 2/6 to lossless traffic in the QoS template.
Add macros to generate additional lossless PG in the dynamic model
Adjust the order in which the generic/dedicated (with additional lossless queues) macros are checked and called to generate buffer tables in common template buffers_config.j2
Buffer tables are rendered via using macros.
Both generic and dedicated macros are defined on our platform. Currently, the generic one is called as long as it is defined, which causes the generic one always being called on our platform. To avoid it, the dedicated macrio is checked and called first and then the generic ones.
Support MAP_PFC_PRIORITY_TO_PRIORITY_GROUP on ports with additional lossless queues.
On Mellanox-SN4600C-C64, buffer configuration for t1 is calculated as:

40 * 100G downlink ports with 4 lossless PGs/queues, 1 lossy PG, and 3 lossy queues
16 * 100G uplink ports with 2 lossless PGs/queues, 1 lossy PG, and 5 lossy queues

Signed-off-by: Stephen Sun <stephens@nvidia.com>
yxieca pushed a commit that referenced this pull request Jul 28, 2022
…ario (#11261)

- Why I did it
Support Mellanox-SN4600C-C64 as T1 switch in dual-ToR scenario
This is to port #11032 and #11299 from 202012 to master.

Support additional queue and PG in buffer templates, including both traditional and dynamic model
Support mapping DSCP 2/6 to lossless traffic in the QoS template.
Add macros to generate additional lossless PG in the dynamic model
Adjust the order in which the generic/dedicated (with additional lossless queues) macros are checked and called to generate buffer tables in common template buffers_config.j2
Buffer tables are rendered via using macros.
Both generic and dedicated macros are defined on our platform. Currently, the generic one is called as long as it is defined, which causes the generic one always being called on our platform. To avoid it, the dedicated macrio is checked and called first and then the generic ones.
Support MAP_PFC_PRIORITY_TO_PRIORITY_GROUP on ports with additional lossless queues.
On Mellanox-SN4600C-C64, buffer configuration for t1 is calculated as:

40 * 100G downlink ports with 4 lossless PGs/queues, 1 lossy PG, and 3 lossy queues
16 * 100G uplink ports with 2 lossless PGs/queues, 1 lossy PG, and 5 lossy queues

Signed-off-by: Stephen Sun <stephens@nvidia.com>
skbarista pushed a commit to skbarista/sonic-buildimage that referenced this pull request Aug 17, 2022
…ario (sonic-net#11261)

- Why I did it
Support Mellanox-SN4600C-C64 as T1 switch in dual-ToR scenario
This is to port sonic-net#11032 and sonic-net#11299 from 202012 to master.

Support additional queue and PG in buffer templates, including both traditional and dynamic model
Support mapping DSCP 2/6 to lossless traffic in the QoS template.
Add macros to generate additional lossless PG in the dynamic model
Adjust the order in which the generic/dedicated (with additional lossless queues) macros are checked and called to generate buffer tables in common template buffers_config.j2
Buffer tables are rendered via using macros.
Both generic and dedicated macros are defined on our platform. Currently, the generic one is called as long as it is defined, which causes the generic one always being called on our platform. To avoid it, the dedicated macrio is checked and called first and then the generic ones.
Support MAP_PFC_PRIORITY_TO_PRIORITY_GROUP on ports with additional lossless queues.
On Mellanox-SN4600C-C64, buffer configuration for t1 is calculated as:

40 * 100G downlink ports with 4 lossless PGs/queues, 1 lossy PG, and 3 lossy queues
16 * 100G uplink ports with 2 lossless PGs/queues, 1 lossy PG, and 5 lossy queues

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants