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

Update active application selected code in transceiver_info table aft… #381

Merged
merged 4 commits into from
Jul 12, 2023
Merged

Update active application selected code in transceiver_info table aft… #381

merged 4 commits into from
Jul 12, 2023

Conversation

MichaelWangSmci
Copy link
Contributor

@MichaelWangSmci MichaelWangSmci commented Jun 21, 2023

…er CMIS config finished successfully

Description

In xcvrd, after cmis manager task has done update CMIS application successfully, the transceiver_info table should also be updated with the new active_apsel_hostlaneN.

Motivation and Context

show interfaces transceiver eeprom should gives the correct "Active application selected code assigned to host lane N".

How Has This Been Tested?

Tested with an Intel DR4 cable in a 400G HwSKU.
This cable has default active application selected codes 2 (for 100G).
CMIS manager task will update the application to 1 (for 400G), and show interfaces transceiver eeprom can gives the expected "Active application selected code assigned to host lane N: 1" with this fix.

Previous command output:

Ethernet160: SFP EEPROM detected
        Active Firmware: 1.0
        Active application selected code assigned to host lane 1: 2
        Active application selected code assigned to host lane 2: 2
        Active application selected code assigned to host lane 3: 2
        Active application selected code assigned to host lane 4: 2
        Active application selected code assigned to host lane 5: 2
        Active application selected code assigned to host lane 6: 2
        Active application selected code assigned to host lane 7: 2
        Active application selected code assigned to host lane 8: 2
        Application Advertisement: 400GAUI-8 C2M (Annex 120E) - Host Assign (0x1) - 400GBASE-DR4 (Cl 124) - Media Assign (0x1)
                                   100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 100GBASE-DR (Cl 140) - Media Assign (0x55)
                                   100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 100G-FR/100GBASE-FR1 (Cl 140) - Media Assign (0x55)
        CMIS Rev: 4.0
        Connector: MPO 1x12
        Encoding: N/A
        Extended Identifier: Power Class 7 (14.0W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: 8
        Identifier: QSFP-DD Double Density 8X Pluggable Transceiver
        Inactive Firmware: 0.0
        Length Cable Assembly(m): 0.0
        Media Interface Technology: 1310 nm DFB
        Media Lane Count: 4
        Module Hardware Rev: 1.1
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: sm_media_interface
        Supported Max Laser Frequency: N/A
        Supported Max TX Power: N/A
        Supported Min Laser Frequency: N/A
        Supported Min TX Power: N/A
        Vendor Date Code(YYYY-MM-DD Lot): 2021-08-26
        Vendor Name: Intel Corp
        Vendor OUI: 00-02-b3
        Vendor PN: SPTSHP2PMCDF
        Vendor Rev: 01
        Vendor SN: CRDR212808SJS

New command output

Ethernet160: SFP EEPROM detected
        Active Firmware: 1.0
        Active application selected code assigned to host lane 1: 1
        Active application selected code assigned to host lane 2: 1
        Active application selected code assigned to host lane 3: 1
        Active application selected code assigned to host lane 4: 1
        Active application selected code assigned to host lane 5: 1
        Active application selected code assigned to host lane 6: 1
        Active application selected code assigned to host lane 7: 1
        Active application selected code assigned to host lane 8: 1
        Application Advertisement: 400GAUI-8 C2M (Annex 120E) - Host Assign (0x1) - 400GBASE-DR4 (Cl 124) - Media Assign (0x1)
                                   100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 100GBASE-DR (Cl 140) - Media Assign (0x55)
                                   100GAUI-2 C2M (Annex 135G) - Host Assign (0x55) - 100G-FR/100GBASE-FR1 (Cl 140) - Media Assign (0x55)
        CMIS Rev: 4.0
        Connector: MPO 1x12
        Encoding: N/A
        Extended Identifier: Power Class 7 (14.0W Max)
        Extended RateSelect Compliance: N/A
        Host Lane Count: 8
        Identifier: QSFP-DD Double Density 8X Pluggable Transceiver
        Inactive Firmware: 0.0
        Length Cable Assembly(m): 0.0
        Media Interface Technology: 1310 nm DFB
        Media Lane Count: 4
        Module Hardware Rev: 1.1
        Nominal Bit Rate(100Mbs): 0
        Specification compliance: sm_media_interface
        Supported Max Laser Frequency: N/A
        Supported Max TX Power: N/A
        Supported Min Laser Frequency: N/A
        Supported Min TX Power: N/A
        Vendor Date Code(YYYY-MM-DD Lot): 2021-08-26
        Vendor Name: Intel Corp
        Vendor OUI: 00-02-b3
        Vendor PN: SPTSHP2PMCDF
        Vendor Rev: 01
        Vendor SN: CRDR212808SJS

Additional Information (Optional)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 21, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

@mihirpat1 mihirpat1 left a comment

Choose a reason for hiding this comment

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

The CLI will still display stale values for "Host Lane Count" and "Media Lane Count" after setting the application. Are you planning to address this as well?

Copy link
Contributor

@mihirpat1 mihirpat1 left a comment

Choose a reason for hiding this comment

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

Wondering if we should create a wrapper to the below function and update the TRANSCEIVER_INFO table accordingly?
https://github.com/sonic-net/sonic-platform-daemons/blob/81048cd1fb63da9fdca567aa863c7d1d43156ed3/sonic-xcvrd/xcvrd/xcvrd.py#L1587C36-L1587C51

@mihirpat1 mihirpat1 requested a review from prgeor June 23, 2023 05:16
@MichaelWangSmci MichaelWangSmci marked this pull request as draft June 26, 2023 06:45
@MichaelWangSmci
Copy link
Contributor Author

The CLI will still display stale values for "Host Lane Count" and "Media Lane Count" after setting the application. Are you planning to address this as well?

Yes, I have now also update "Host Lane Count" and "Media Lane Count".

@MichaelWangSmci
Copy link
Contributor Author

Wondering if we should create a wrapper to the below function and update the TRANSCEIVER_INFO table accordingly? https://github.com/sonic-net/sonic-platform-daemons/blob/81048cd1fb63da9fdca567aa863c7d1d43156ed3/sonic-xcvrd/xcvrd/xcvrd.py#L1587C36-L1587C51

I think it would be better not to update TRANSCEIVER_INFO table until data path is activated.

@MichaelWangSmci MichaelWangSmci marked this pull request as ready for review June 27, 2023 08:22
@prgeor prgeor added the CMIS label Jun 27, 2023
Copy link
Collaborator

@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.

@MichaelWangSmci can you also take care of the case where user executes 'config interface shutdown' in which case module datapaths remain deactivated?

@MichaelWangSmci
Copy link
Contributor Author

@MichaelWangSmci can you also take care of the case where user executes 'config interface shutdown' in which case module datapaths remain deactivated?

After 'config interface shutdown' module datapaths state are 'DataPathInitialized' because Tx are disabled.
In this case, the active control set are not updated, right?

@prgeor
Copy link
Collaborator

prgeor commented Jul 7, 2023

@MichaelWangSmci can you also take care of the case where user executes 'config interface shutdown' in which case module datapaths remain deactivated?

After 'config interface shutdown' module datapaths state are 'DataPathInitialized' because Tx are disabled. In this case, the active control set are not updated, right?

@MichaelWangSmci yes not updated, but won't it confuse the user ? if the datapath is no

@MichaelWangSmci can you also take care of the case where user executes 'config interface shutdown' in which case module datapaths remain deactivated?

After 'config interface shutdown' module datapaths state are 'DataPathInitialized' because Tx are disabled. In this case, the active control set are not updated, right?

@MichaelWangSmci right.

@prgeor prgeor merged commit 432602a into sonic-net:master Jul 12, 2023
4 checks passed
@prgeor
Copy link
Collaborator

prgeor commented Aug 2, 2023

@yxieca @StormLiangMS please help cherry pick this accordingly.

@mihirpat1
Copy link
Contributor

@yxieca @StormLiangMS please help cherry pick this accordingly.

ADO - 21982389

StormLiangMS pushed a commit that referenced this pull request Aug 6, 2023
#381)

* Update active application selected code in transceiver_info table after CMIS config finished successfully

* code rearrangement

* add tests for post_port_active_apsel_to_db()

* also update host_lane_count and media_lane_count
yxieca pushed a commit that referenced this pull request Aug 10, 2023
#381)

* Update active application selected code in transceiver_info table after CMIS config finished successfully

* code rearrangement

* add tests for post_port_active_apsel_to_db()

* also update host_lane_count and media_lane_count
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.

5 participants