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] Verify the value of the control type sysfs before changing it to FW control #19046

Conversation

tshalvi
Copy link
Contributor

@tshalvi tshalvi commented May 23, 2024

Why I did it

On Mellanox platforms, changing the control type sysfs value is not supported for ports that are set to firmware control. Therefore, attempting to change this value to firmware control will result in an error log, which we want to avoid.

Work item tracking
  • Microsoft ADO (number only):

How I did it

I added a check to ensure that the control sysfs value is set to firmware control only if it is not already in firmware control.

How to verify it

Ensure that after a warm reboot on the Mellanox platform (an attempt to change the sysfs value from fw_control to fw_control is only applicable in this scenario), the following error does not appear:
sxd_kernel: [error] sx_core_set_module_control: Failed control change: module is dependent (FW control).

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

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

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

…are control only if it is not already in firmware control
@tshalvi tshalvi requested a review from lguohan as a code owner May 23, 2024 08:50
@tshalvi tshalvi changed the title Verify the value of the control type sysfs before changing it to FW control [Mellanox only] Verify the value of the control type sysfs before changing it to FW control May 23, 2024
@tshalvi tshalvi changed the title [Mellanox only] Verify the value of the control type sysfs before changing it to FW control [Mellanox] Verify the value of the control type sysfs before changing it to FW control May 23, 2024
@liat-grozovik liat-grozovik merged commit 10e0df9 into sonic-net:master May 28, 2024
11 checks passed
@dprital
Copy link
Collaborator

dprital commented May 28, 2024

@yxieca , Can you please cherry pick to 202311 ?

mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request May 28, 2024
… it to FW control (sonic-net#19046)

- Why I did it
On Mellanox platforms, changing the control type sysfs value is not supported for ports that are set to firmware control. Therefore, attempting to change this value to firmware control will result in an error log, which we want to avoid.

- How I did it
I added a check to ensure that the control sysfs value is set to firmware control only if it is not already in firmware control.

- How to verify it
Ensure that after a warm reboot on the Mellanox platform (an attempt to change the sysfs value from fw_control to fw_control is only applicable in this scenario), the following error does not appear:
sxd_kernel: [error] sx_core_set_module_control: Failed control change: module is dependent (FW control).
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202311: #19112

mssonicbld pushed a commit that referenced this pull request May 29, 2024
… it to FW control (#19046)

- Why I did it
On Mellanox platforms, changing the control type sysfs value is not supported for ports that are set to firmware control. Therefore, attempting to change this value to firmware control will result in an error log, which we want to avoid.

- How I did it
I added a check to ensure that the control sysfs value is set to firmware control only if it is not already in firmware control.

- How to verify it
Ensure that after a warm reboot on the Mellanox platform (an attempt to change the sysfs value from fw_control to fw_control is only applicable in this scenario), the following error does not appear:
sxd_kernel: [error] sx_core_set_module_control: Failed control change: module is dependent (FW control).
@bingwang-ms
Copy link
Contributor

MSFT ADO: 28219305

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