Skip to content

[202503][PR:23107] Enable link training support in sonic-mgmt#1077

Merged
bingwang-ms merged 4 commits intoAzure:202503from
sdszhang:link_training_cfg_db_202503
Mar 24, 2026
Merged

[202503][PR:23107] Enable link training support in sonic-mgmt#1077
bingwang-ms merged 4 commits intoAzure:202503from
sdszhang:link_training_cfg_db_202503

Conversation

@sdszhang
Copy link

cherry-pick sonic-net/sonic-mgmt#23107 into 202503.

Description of PR

Summary:
Enable link-training support in sonic-mgmt

Currently, enabling them for all server facing ports in F2 T0 topo. Once we have port-channel support, we can enable them only for port-channel in F2 topo.

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?

Enabling link training in golden_config_db for F2 topology.

How did you verify/test it?

local testbed.

Any platform specific information?

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

Documentation

@sdszhang sdszhang requested a review from Copilot March 19, 2026 10:52
Copy link

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

Cherry-picks upstream changes to enable link-training support in the SONiC mgmt tooling, primarily by propagating link-training intent from the connection graph into generated fanout configs and by generating a topo-specific golden config override for t0-f2.

Changes:

  • Extend fanout SONiC deploy template to emit link_training (and enhanced FEC/autoneg handling) based on device_conn link metadata.
  • Add generate_t0_f2_golden_config_db() to enable link_training on server-facing ports for supported t0-f2 topology.
  • Parse LinkTraining from connection graph link records into device_conn facts.

Reviewed changes

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

File Description
ansible/roles/fanout/templates/sonic_deploy_202405.j2 Emits per-port link_training/autoneg/FEC settings into the fanout base config JSON.
ansible/library/generate_golden_config_db.py Generates topo-specific golden config enabling link_training on server-facing ports for t0-f2.
ansible/library/conn_graph_facts.py Adds parsing/propagation of LinkTraining link metadata into device_conn.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: Dashuai Zhang <[email protected]>
@bingwang-ms bingwang-ms merged commit bf12c26 into Azure:202503 Mar 24, 2026
3 checks passed
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.

3 participants