Skip to content

Enable link training support in sonic-mgmt#22870

Closed
sdszhang wants to merge 5 commits intosonic-net:masterfrom
sdszhang:link_training
Closed

Enable link training support in sonic-mgmt#22870
sdszhang wants to merge 5 commits intosonic-net:masterfrom
sdszhang:link_training

Conversation

@sdszhang
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Enable link-training support in sonic-mgmt

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

Enable link-training support in sonic-mgmt

How did you do it?

Add link training into minigraph template

How did you verify/test it?

local testbed.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@sdszhang sdszhang changed the title Link training Enable link training support in sonic-mgmt Mar 11, 2026
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables link-training support in sonic-mgmt by propagating link-training metadata from the connection graph into generated minigraph/link metadata and fanout config templates.

Changes:

  • Add LinkTraining parsing from CSV link facts into graph facts (device_conn / graph_facts["links"]).
  • Emit LinkTraining device properties in the minigraph link metadata template.
  • Emit link-training configuration for SONiC fanout deployment (202405 template).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
ansible/templates/minigraph_link_meta.j2 Adds LinkTraining property emission into link metadata rendering.
ansible/roles/fanout/templates/sonic_deploy_202405.j2 Adds link-training field to generated fanout PORT config.
ansible/module_utils/graph_utils.py Parses LinkTraining from CSV links into graph facts.

Signed-off-by: Dashuai Zhang <dashuaizhang@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Dashuai Zhang <dashuaizhang@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Dashuai Zhang <dashuaizhang@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Dashuai Zhang <dashuaizhang@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Dashuai Zhang <dashuaizhang@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms
Copy link
Copy Markdown
Collaborator

This PR LGTM. But it has dependency on sonic-net/sonic-buildimage#26129
Suggest merging sonic-buildimage change first

Copy link
Copy Markdown
Collaborator

@yxieca yxieca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI agent on behalf of Ying. Reviewed; no issues found.

@sdszhang sdszhang marked this pull request as draft March 18, 2026 06:20
@sdszhang
Copy link
Copy Markdown
Contributor Author

closing this PR as minigraph is not suppose to be changed anymore. New method is using golden_config_db to generate link_training config. #23107

@sdszhang sdszhang closed this Mar 19, 2026
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.

6 participants