Skip to content

[Mellanox] Update spf test related to error status when sw control is enabled#16573

Merged
bingwang-ms merged 4 commits intosonic-net:masterfrom
JibinBao:sfp_error_state
Mar 13, 2025
Merged

[Mellanox] Update spf test related to error status when sw control is enabled#16573
bingwang-ms merged 4 commits intosonic-net:masterfrom
JibinBao:sfp_error_state

Conversation

@JibinBao
Copy link
Contributor

@JibinBao JibinBao commented Jan 17, 2025

Description of PR

Update spf platform test related to error status, due to PR: sonic-net/sonic-buildimage#20964
When software control is enabled, the port error status is as follows:

  1. For active module, the expected state is OK
  2. For cmis passive module, when cmis ver is 3.0, the expected state is ModuleLowPwr, else it is OK
  3. For non cmis passive module, the expected state is 'Not supported'

When software control is disabled, the port error status keeps the original behaviour

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?

Update spf test related to error status when sw control is enabled

How did you do it?

When sw control is enabled, check the error stats as the following logic:

  1. For active module, the expected state is OK
  2. For cmis passive module, the expected state is ModuleLowPwr
  3. For non cmis passive module, the expected state is 'Not supported'

How did you verify/test it?

Run test_get_error_description and test_check_sfputil_error_status when sw control is enabled

Any platform specific information?

Mellanox

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

Documentation

@JibinBao JibinBao requested a review from prgeor as a code owner January 17, 2025 09:18
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

…nic-buildimage#20964

When software control is enabled, the port error status is as follows:
1. For active module, the expected state is OK
2. For cmis passive module, the expected state is ModuleLowPwr
3. For non cmis passive module, the expected state is 'Not supported'

when software control is disabled, the port error status keep the original behaviour
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingwang-ms
Copy link
Collaborator

@prgeor Could you help review?

@bingwang-ms
Copy link
Collaborator

We saw the returned error description is Unknown for some module when sw_control is enabled

admin@str3-msn4700-02:~$ sudo sfputil show error-status --fetch-from-hardware
Port         Error Status
-----------  --------------
Ethernet0    Unknown

admin@str3-msn4700-02:~$ sudo sfputil show eeprom -d -p Ethernet0
Ethernet0: SFP EEPROM detected
        Active App Selection Host Lane 1: N/A
        Active App Selection Host Lane 2: N/A
        Active App Selection Host Lane 3: N/A
        Active App Selection Host Lane 4: N/A
        Active App Selection Host Lane 5: N/A
        Active App Selection Host Lane 6: N/A
        Active App Selection Host Lane 7: N/A
        Active App Selection Host Lane 8: N/A
        Application Advertisement: 400G CR8 - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   200GBASE-CR4 (Clause 136) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR2 (Clause 136) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   50GBASE-CR (Clause 126) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR4 (Clause 92) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   25GBASE-CR CA-N (Clause 110) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   25GBASE-CR CA-S (Clause 110) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   25GBASE-CR CA-L (Clause 110) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
        CMIS Revision: 5.0
        Connector: No separable connector
        Encoding: N/A
        Extended Identifier: Power Class 1 (0.25W Max)
        Extended RateSelect Compliance: N/A
        Hardware Revision: 0.0
        Host Electrical Interface: N/A
        Host Lane Assignment Options: 1
        Host Lane Count: 8
        Identifier: QSFP-DD Double Density 8X Pluggable Transceiver
        Length Cable Assembly(m): 1.0
        Media Interface Code: Copper cable
        Media Interface Technology: Copper cable unequalized
        Media Lane Assignment Options: N/A
        Media Lane Count: 0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: passive_copper_media_interface
        Vendor Date Code(YYYY-MM-DD Lot): 2023-06-25   
        Vendor Name: Amphenol        
        Vendor OUI: 78-a7-14
        Vendor PN: NDYYYS-M201     
        Vendor Rev: A 
        Vendor SN: APF23232016YUY  
DOM values not supported for flat memory module

Can this change handle such case?

1. For cmis passive module, when cmis ver is 3.0, the expected state is ModuleLowPwr, else it is OK
@JibinBao
Copy link
Contributor Author

We saw the returned error description is Unknown for some module when sw_control is enabled

admin@str3-msn4700-02:~$ sudo sfputil show error-status --fetch-from-hardware
Port         Error Status
-----------  --------------
Ethernet0    Unknown

admin@str3-msn4700-02:~$ sudo sfputil show eeprom -d -p Ethernet0
Ethernet0: SFP EEPROM detected
        Active App Selection Host Lane 1: N/A
        Active App Selection Host Lane 2: N/A
        Active App Selection Host Lane 3: N/A
        Active App Selection Host Lane 4: N/A
        Active App Selection Host Lane 5: N/A
        Active App Selection Host Lane 6: N/A
        Active App Selection Host Lane 7: N/A
        Active App Selection Host Lane 8: N/A
        Application Advertisement: 400G CR8 - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   200GBASE-CR4 (Clause 136) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR2 (Clause 136) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   50GBASE-CR (Clause 126) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   100GBASE-CR4 (Clause 92) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   25GBASE-CR CA-N (Clause 110) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   25GBASE-CR CA-S (Clause 110) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
                                   25GBASE-CR CA-L (Clause 110) - Host Assign (0x1) - Copper cable - Media Assign (Unknown)
        CMIS Revision: 5.0
        Connector: No separable connector
        Encoding: N/A
        Extended Identifier: Power Class 1 (0.25W Max)
        Extended RateSelect Compliance: N/A
        Hardware Revision: 0.0
        Host Electrical Interface: N/A
        Host Lane Assignment Options: 1
        Host Lane Count: 8
        Identifier: QSFP-DD Double Density 8X Pluggable Transceiver
        Length Cable Assembly(m): 1.0
        Media Interface Code: Copper cable
        Media Interface Technology: Copper cable unequalized
        Media Lane Assignment Options: N/A
        Media Lane Count: 0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: passive_copper_media_interface
        Vendor Date Code(YYYY-MM-DD Lot): 2023-06-25   
        Vendor Name: Amphenol        
        Vendor OUI: 78-a7-14
        Vendor PN: NDYYYS-M201     
        Vendor Rev: A 
        Vendor SN: APF23232016YUY  
DOM values not supported for flat memory module

Can this change handle such case?

No. This case looks like a real issue, which has been fixed by sonic-net/sonic-platform-common#538

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JibinBao
Copy link
Contributor Author

/azpw run Azure.sonic-mgmt

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-mgmt

@prabhataravind
Copy link
Contributor

@congh-nvidia @oleksandrivantsiv this one too needed for 202411

@congh-nvidia
Copy link
Contributor

Hi @bingwang-ms , could you help cherry-pick this to 202411? Looks like the auto cherry-pick was not triggered.

@prabhataravind
Copy link
Contributor

@congh-nvidia there's a cherry-pick conflict for 202411. Could you please raise a new PR for 202411? Also, is this needed for 202505?

@congh-nvidia
Copy link
Contributor

Hi @JibinBao , please cherry-pick to 202411.
And @prabhataravind I think it's already in 202505 since it was merged on Mar.

JibinBao added a commit to JibinBao/sonic-mgmt that referenced this pull request Jun 30, 2025
… enabled (sonic-net#16573)

* Update spf platform test related to error status, due to sonic-net/sonic-buildimage#20964

When software control is enabled, the port error status is as follows:
1. For active module, the expected state is OK
2. For cmis passive module, the expected state is ModuleLowPwr
3. For non cmis passive module, the expected state is 'Not supported'

when software control is disabled, the port error status keep the original behaviour

* fix issue caused by the vs

* sfp test just run on physical setup

* update sfp tests

1. For cmis passive module, when cmis ver is 3.0, the expected state is ModuleLowPwr, else it is OK
@JibinBao
Copy link
Contributor Author

Hi @JibinBao , please cherry-pick to 202411. And @prabhataravind I think it's already in 202505 since it was merged on Mar.

@prabhataravind
Done for 202411, #19264. Can you help review it ?

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 30, 2025
… enabled (sonic-net#16573)

* Update spf platform test related to error status, due to sonic-net/sonic-buildimage#20964

When software control is enabled, the port error status is as follows:
1. For active module, the expected state is OK
2. For cmis passive module, the expected state is ModuleLowPwr
3. For non cmis passive module, the expected state is 'Not supported'

when software control is disabled, the port error status keep the original behaviour

* fix issue caused by the vs

* sfp test just run on physical setup

* update sfp tests

1. For cmis passive module, when cmis ver is 3.0, the expected state is ModuleLowPwr, else it is OK
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #19273

kperumalbfn pushed a commit that referenced this pull request Jun 30, 2025
… enabled (#16573) (#19264)

[Mellanox] Update spf test related to error status when sw control is enabled
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Jul 1, 2025
… enabled (sonic-net#16573) (sonic-net#19264)

[Mellanox] Update spf test related to error status when sw control is enabled
judyjoseph pushed a commit that referenced this pull request Jul 12, 2025
PR #16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jul 13, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
mssonicbld pushed a commit that referenced this pull request Jul 13, 2025
PR #16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
sdszhang pushed a commit to sdszhang/sonic-mgmt that referenced this pull request Aug 2, 2025
Code sync sonic-net/sonic-mgmt:202411 => 202412

```
*   fb53396 (HEAD -> code-sync-202412, origin/code-sync-202412) r12f 250701:1725 - Merge remote-tracking branch 'base/202411' into code-sync-202412
|\
| * 54633cb (base/202411) prabhataravind 250701:0928 - Add t1-28-lag and t1-48-lag to tests_mark_conditions.yaml (sonic-net#19274)
| * 9a23c16 Cong Hou 250416:2355 - Align the sensors data for SN4280 with sonic-buildimage PR#21845 (sonic-net#17747)
| * 8b2d2cd Jibin Bao 250306:0835 - add watchdog test data for x86_64-nvidia_sn4280-r0 (sonic-net#17312)
| * 5c8d5f0 Jibin Bao 250701:0045 - [Mellanox] Update spf test related to error status when sw control is enabled (sonic-net#16573) (sonic-net#19264)
| * 0bea309 Yawen 250411:1620 - add hwsku V64 (sonic-net#17897)
| * 8ab9e6b zitingguo-ms 250628:1755 - [test_static_route] Skip PT0 neighbor when checking route redistribution (sonic-net#19226)
| * 4276be3 prabhataravind 250627:1827 - Support t1-48-lag topo for acl tests (sonic-net#19236)
| * e070035 Wenda Chu 250625:1719 - Skip multiple servers testbed parsing on branch 202411 (sonic-net#19158)
| * 0e5645d xwjiang-ms 250625:1619 - Roll back ceos image version since it's causing bgp failure (sonic-net#19180)
| * 7625d06 ganglv 250624:1548 - Fix configuration after gnmi test (sonic-net#19150)
| * 25e2e55 zitingguo-ms 250624:2000 - [ACL] Record service ports individually and add them to the acl_table_ports (sonic-net#19168)
```
nissampa pushed a commit to nissampa/sonic-mgmt_dpu_test that referenced this pull request Aug 7, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
ashutosh-agrawal pushed a commit to ashutosh-agrawal/sonic-mgmt that referenced this pull request Aug 14, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
vidyac86 pushed a commit to vidyac86/sonic-mgmt that referenced this pull request Oct 23, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 16, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
… enabled (sonic-net#16573)

* Update spf platform test related to error status, due to sonic-net/sonic-buildimage#20964

When software control is enabled, the port error status is as follows:
1. For active module, the expected state is OK
2. For cmis passive module, the expected state is ModuleLowPwr
3. For non cmis passive module, the expected state is 'Not supported'

when software control is disabled, the port error status keep the original behaviour

* fix issue caused by the vs

* sfp test just run on physical setup

* update sfp tests

1. For cmis passive module, when cmis ver is 3.0, the expected state is ModuleLowPwr, else it is OK

Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Jan 13, 2026
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
… enabled (sonic-net#16573)

* Update spf platform test related to error status, due to sonic-net/sonic-buildimage#20964

When software control is enabled, the port error status is as follows:
1. For active module, the expected state is OK
2. For cmis passive module, the expected state is ModuleLowPwr
3. For non cmis passive module, the expected state is 'Not supported'

when software control is disabled, the port error status keep the original behaviour

* fix issue caused by the vs

* sfp test just run on physical setup

* update sfp tests

1. For cmis passive module, when cmis ver is 3.0, the expected state is ModuleLowPwr, else it is OK

Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…#18090)

PR sonic-net#16573 added some fixtures for getting port information for sfp
tests, however when these fixtures run on supervisor nodes, it fails as
sfputil is not valid for supervisors.
Add a check in these fixtures to skip supervisor nodes

Signed-off-by: Liam Kearney <[email protected]>
Signed-off-by: Yael Tzur <[email protected]>
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