Skip to content

Increase timeout and set port AutonNeg according to the links file #16647

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Pterosaur
Copy link
Contributor

@Pterosaur Pterosaur commented Jan 23, 2025

Description of PR

Summary:
Fixes # (issue)

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

  1. Some testbeds have more ports than the previous testbed, so increasing the waiting time
  2. The AutoNeg is not set in config db even if this value was specified in link files

How did you do it?

  1. Increasing the timeout from 180 to 300
  2. Update the autoneg in config db according to the device_conn

How did you verify/test it?

Check it in the local physical testbed

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur marked this pull request as ready for review January 23, 2025 11:08
@Pterosaur Pterosaur force-pushed the device_conn_autoneg branch from a5b8233 to f886eae Compare January 23, 2025 11:11
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur force-pushed the device_conn_autoneg branch from f886eae to 8f02cf7 Compare January 23, 2025 11:25
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur force-pushed the device_conn_autoneg branch from 8f02cf7 to 5aa34b0 Compare January 23, 2025 11:29
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Pterosaur Pterosaur requested a review from r12f January 23, 2025 11:46
@Pterosaur Pterosaur force-pushed the device_conn_autoneg branch from 5aa34b0 to 82224ef Compare January 23, 2025 20:23
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

{% if port_name in device_conn[inventory_hostname] and 'autoneg' in device_conn[inventory_hostname][port_name] %}
"autoneg": "{{ device_conn[inventory_hostname][port_name]['autoneg'] }}",
{% else %}
{% if fanout_hwsku == "Mellanox-SN5600-C256S1" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe better to check against platform, since it is needed for all SP3 and SP4 platforms.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms
Copy link
Collaborator

@vdahiya12 Could you please help review? Please confirm this change doesn't conflict with the change you are working on

{% if port_name in device_conn[inventory_hostname] and 'autoneg' in device_conn[inventory_hostname][port_name] %}
"autoneg": "{{ device_conn[inventory_hostname][port_name]['autoneg'] }}",
{% else %}
{% if "Mellanox-SN5" in fanout_hwsku or "Mellanox-SN4" in fanout_hwsku %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We also have Mellanox-SN4600, which doesn't require AN. So better to check a list of HWSKU ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you please provide a list of HWSKU to me?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

if we already have done the check for autoneg = 'on' in the *links.csv, do we really require a hwsku check ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for the default scenario. Because the *links.csv didn't include all ports.
For example, a SKU has 64 ports, but there is only 32 ports in *links.csv.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest checking the port speed. Enable AN if port speed >= 200Gb.

Copy link
Contributor

@prgeor prgeor left a comment

Choose a reason for hiding this comment

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

@Pterosaur @bingwang-ms lets discuss this before we merge. I don't think we need to put hwsku specific check here. not right. we should follow SAI spec for AN

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

# Apply Autoneg
default_autoneg_value = None
# For SP4 and SP3, the default autoneg value is "on"
if "nvidia_sn5" in platform or "nvidia_sn4" in platform:
Copy link
Contributor

Choose a reason for hiding this comment

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

do u still need to have this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't really need them, remove them.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Choose a reason for hiding this comment

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

@Pterosaur This file change is not needed. The link file has the AN column and the minigraph should be able to generate the configuration for the AN enabled port. @vdahiya12 can you point to that?

@@ -771,6 +771,13 @@

when: "'dualtor-mixed' in topo or 'dualtor-aa' in topo"

- name: Apply device conn to config db
apply_device_conn_sonic:
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this for applying sonic config?
much of the config DB config will happen via #13990

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you sure the AutoNeg value in minigraph will be applied into the config DB?

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

Choose a reason for hiding this comment

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

@Pterosaur are we going to develop this code for each and every new sku in the future. AN should be SKU agnostic

@Pterosaur Pterosaur marked this pull request as draft February 23, 2025 20:12
@@ -0,0 +1,66 @@
#!/usr/bin/env python

from ansible.module_utils.basic import AnsibleModule
Copy link
Contributor

Choose a reason for hiding this comment

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

this file change should not be needed any more

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