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

Apply custom Si settings via CMIS: SONiC xcvrd platform daemon changes #385

Merged
merged 35 commits into from
Aug 16, 2023
Merged

Apply custom Si settings via CMIS: SONiC xcvrd platform daemon changes #385

merged 35 commits into from
Aug 16, 2023

Conversation

AnoopKamath
Copy link
Contributor

@AnoopKamath AnoopKamath commented Jul 6, 2023

Apply custom Si settings via CMIS: SONiC xcvrd daemon changes

Description

  1. Parse the json file during boot up and update global optics_si dict
  2. After the application is set in CMIS FSM, before DP_INIT, apply SI settings on supported modules.
  3. Apply AppSel code with Explicit control bit set to 1

HLD : sonic-net/SONiC#1334

CMIS changes: sonic-net/sonic-platform-common#384

Motivation and Context

Certain high-speed QSFP_DD, OSFP and QSFP modules require Signal Integrity (SI) settings to match platform media settings in order to achieve link stability, right tunning and optimal performance.

How Has This Been Tested?

Added few debugs and made sure right SI settings were picked up and applied successfully.
Validated all flags and eeprom details

Jul  5 20:45:11.039499 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: 400G, lanemask=0x0, state=INSERTED, appl 0 host_lane_count 4 retries=0
Jul  5 20:45:11.106772 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Setting appl=3
Jul  5 20:45:11.174518 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Setting host_lanemask=0xf0
Jul  5 20:45:11.310503 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Setting media_lanemask=0xf0
Jul  5 20:45:11.324864 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: force Datapath reinit
Jul  5 20:45:26.070890 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: 400G, lanemask=0xf0, state=DP_DEINIT, appl 3 host_lane_count 4 retries=0
Jul  5 20:45:27.092763 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: DpDeinit duration 1.0 secs, modulePwrUp duration 10.0 secs
Jul  5 20:45:43.478087 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: 400G, lanemask=0xf0, state=AP_CONFIGURED, appl 3 host_lane_count 4 retries=0
Jul  5 20:45:51.599654 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: 400G, lanemask=0xf0, state=INSERTED, appl 3 host_lane_count 4 retries=0
Jul  5 20:45:51.666621 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Setting appl=3
Jul  5 20:45:51.731384 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Setting host_lanemask=0xf0
Jul  5 20:45:51.864526 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Setting media_lanemask=0xf0
Jul  5 20:45:51.886060 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: force Datapath reinit
Jul  5 20:46:04.492551 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: 400G, lanemask=0xf0, state=DP_DEINIT, appl 3 host_lane_count 4 retries=0
Jul  5 20:46:05.514641 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: DpDeinit duration 1.0 secs, modulePwrUp duration 10.0 secs
Jul  5 20:46:11.329007 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: 400G, lanemask=0xf0, state=AP_CONFIGURED, appl 3 host_lane_count 4 retries=0

Jul  5 20:46:22.432689 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: 400G, lanemask=0xf0, state=DP_INIT, appl 3 host_lane_count 4 retries=0
Jul  5 20:46:22.432707 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Check config first time
Jul  5 20:46:22.440499 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124 SI config is applicable...

Jul  5 20:46:23.201671 sonic ERR pmon#xcvrd[26]: Port15 Anoop FINAL optics_si {'OutputEqPreCursorTargetRx': {'OutputEqPreCursorTargetRx1': 3, 'OutputEqPreCursorTargetRx2': 3, 'OutputEqPreCursorTargetRx3': 3, 'OutputEqPreCursorTargetRx4': 3, 'OutputEqPreCursorTargetRx5': 3, 'OutputEqPreCursorTargetRx6': 3, 'OutputEqPreCursorTargetRx7': 3, 'OutputEqPreCursorTargetRx8': 3}, 'OutputEqPostCursorTargetRx': {'OutputEqPostCursorTargetRx1': 0, 'OutputEqPostCursorTargetRx2': 0, 'OutputEqPostCursorTargetRx3': 0, 'OutputEqPostCursorTargetRx4': 0, 'OutputEqPostCursorTargetRx5': 0, 'OutputEqPostCursorTargetRx6': 0, 'OutputEqPostCursorTargetRx7': 0, 'OutputEqPostCursorTargetRx8': 0}, 'OutputAmplitudeTargetRx': {'OutputAmplitudeTargetRx1': 2, 'OutputAmplitudeTargetRx2': 2, 'OutputAmplitudeTargetRx3': 2, 'OutputAmplitudeTargetRx4': 2, 'OutputAmplitudeTargetRx5': 2, 'OutputAmplitudeTargetRx6': 2, 'OutputAmplitudeTargetRx7': 2, 'OutputAmplitudeTargetRx8': 2}}

Jul  5 20:46:23.201671 sonic NOTICE pmon#xcvrd[26]: CMIS: Ethernet124: Optics SI found. Apply

Jul  5 20:46:23.215364 sonic INFO pmon#supervisord: xcvrd ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:ANOOP print old SCS: {'AdaptiveInputEqEnableTx': {'AdaptiveInputEqEnableTx1': 1, 'AdaptiveInputEqEnableTx2': 1, 'AdaptiveInputEqEnableTx3': 1, 'AdaptiveInputEqEnableTx4': 1, 'AdaptiveInputEqEnableTx5': 1, 'AdaptiveInputEqEnableTx6': 1, 'AdaptiveInputEqEnableTx7': 1, 'AdaptiveInputEqEnableTx8': 1}, 'AdaptiveInputEqRecalledTx': {'AdaptiveInputEqRecalledTx1': 0, 'AdaptiveInputEqRecalledTx2': 0, 'AdaptiveInputEqRecalledTx3': 0, 'AdaptiveInputEqRecalledTx4': 0, 'AdaptiveInputEqRecalledTx5': 0, 'AdaptiveInputEqRecalledTx6': 0, 'AdaptiveInputEqRecalledTx7': 0, 'AdaptiveInputEqRecalledTx8': 0}, 'FixedInputEqTargetTx': {'FixedInputEqTargetTx1': 3, 'FixedInputEqTargetTx2': 3, 'FixedInputEqTargetTx3': 3, 'FixedInputEqTargetTx4': 3, 'FixedInputEqTargetTx5': 3, 'FixedInputEqTargetTx6': 3, 'FixedInputEqTargetTx7': 3, 'FixedInputEqTargetTx8': 3}, 'CDREnableTx': {'CDREnableTx1': 1, 'CDREnableTx2': 1, 'CDREnableTx3': 1, 'CDREnableTx4': 1, 'CDREnableTx5': 1, 'CDREnableTx6': 1, 'CDREnableTx7': 1, 'CDREnableTx8': 1}, 'CDREnableRx': {'CDREnableRx1': 1, 'CDREnableRx2': 1, 'CDREnableRx3': 1, 'CDREnableRx4': 1, 'CDREnableRx5': 1, 'CDREnableRx6': 1, 'CDREnableRx7': 1, 'CDREnableRx8': 1}, 'OutputEqPreCursorTargetRx': {'OutputEqPreCursorTargetRx1': 3, 'OutputEqPreCursorTargetRx2': 3, 'OutputEqPreCursorTargetRx3': 3, 'OutputEqPreCursorTargetRx4': 3, 'OutputEqPreCursorTargetRx5': 3, 'OutputEqPreCursorTargetRx6': 3, 'OutputEqPreCursorTargetRx7': 3, 'OutputEqPreCursorTargetRx8': 3}, 'OutputEqPostCursorTargetRx': {'OutputEqPostCursorTargetRx1': 0, 'OutputEqPostCursorTargetRx2': 0, 'OutputEqPostCursorTargetRx3': 0, 'OutputEqPostCursorTargetRx4': 0, 'OutputEqPostCursorTargetRx5': 0, 'OutputEqPostCursorTargetRx6': 0, 'OutputEqPostCursorTargetRx7': 0, 'OutputEqPostCursorTargetRx8': 0}, 'OutputAmplitudeTargetRx': {'OutputAmplitudeTargetRx1': 2, 'OutputAmplitudeTargetRx2': 2, 'OutputAmplitudeTargetRx3': 2, 'OutputAmplitudeTargetRx4': 2, 'OutputAmplitudeTargetRx5': 3, 'OutputAmplitudeTargetRx6': 3, 'OutputAmplitudeTargetRx7': 3, 'OutputAmplitudeTargetRx8': 3}}

Jul  5 20:46:23.215518 sonic INFO pmon#supervisord: xcvrd ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:Anoop optics_dict:{'OutputEqPreCursorTargetRx': {'OutputEqPreCursorTargetRx1': 3, 'OutputEqPreCursorTargetRx2': 3, 'OutputEqPreCursorTargetRx3': 3, 'OutputEqPreCursorTargetRx4': 3, 'OutputEqPreCursorTargetRx5': 3, 'OutputEqPreCursorTargetRx6': 3, 'OutputEqPreCursorTargetRx7': 3, 'OutputEqPreCursorTargetRx8': 3}, 'OutputEqPostCursorTargetRx': {'OutputEqPostCursorTargetRx1': 0, 'OutputEqPostCursorTargetRx2': 0, 'OutputEqPostCursorTargetRx3': 0, 'OutputEqPostCursorTargetRx4': 0, 'OutputEqPostCursorTargetRx5': 0, 'OutputEqPostCursorTargetRx6': 0, 'OutputEqPostCursorTargetRx7': 0, 'OutputEqPostCursorTargetRx8': 0}, 'OutputAmplitudeTargetRx': {'OutputAmplitudeTargetRx1': 2, 'OutputAmplitudeTargetRx2': 2, 'OutputAmplitudeTargetRx3': 2, 'OutputAmplitudeTargetRx4': 2, 'OutputAmplitudeTargetRx5': 2, 'OutputAmplitudeTargetRx6': 2, 'OutputAmplitudeTargetRx7': 2, 'OutputAmplitudeTargetRx8': 2}}

Jul  5 20:46:23.215529 sonic INFO pmon#supervisord: xcvrd ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:Anoop FINAL writable dict:{'AdaptiveInputEqEnableTx': {'AdaptiveInputEqEnableTx1': 1, 'AdaptiveInputEqEnableTx2': 1, 'AdaptiveInputEqEnableTx3': 1, 'AdaptiveInputEqEnableTx4': 1, 'AdaptiveInputEqEnableTx5': 1, 'AdaptiveInputEqEnableTx6': 1, 'AdaptiveInputEqEnableTx7': 1, 'AdaptiveInputEqEnableTx8': 1}, 'AdaptiveInputEqRecalledTx': {'AdaptiveInputEqRecalledTx1': 0, 'AdaptiveInputEqRecalledTx2': 0, 'AdaptiveInputEqRecalledTx3': 0, 'AdaptiveInputEqRecalledTx4': 0, 'AdaptiveInputEqRecalledTx5': 0, 'AdaptiveInputEqRecalledTx6': 0, 'AdaptiveInputEqRecalledTx7': 0, 'AdaptiveInputEqRecalledTx8': 0}, 'FixedInputEqTargetTx': {'FixedInputEqTargetTx1': 3, 'FixedInputEqTargetTx2': 3, 'FixedInputEqTargetTx3': 3, 'FixedInputEqTargetTx4': 3, 'FixedInputEqTargetTx5': 3, 'FixedInputEqTargetTx6': 3, 'FixedInputEqTargetTx7': 3, 'FixedInputEqTargetTx8': 3}, 'CDREnableTx': {'CDREnableTx1': 1, 'CDREnableTx2': 1, 'CDREnableTx3': 1, 'CDREnableTx4': 1, 'CDREnableTx5': 1, 'CDREnableTx6': 1, 'CDREnableTx7': 1, 'CDREnableTx8': 1}, 'CDREnableRx': {'CDREnableRx1': 1, 'CDREnableRx2': 1, 'CDREnableRx3': 1, 'CDREnableRx4': 1, 'CDREnableRx5': 1, 'CDREnableRx6': 1, 'CDREnableRx7': 1, 'CDREnableRx8': 1}, 'OutputEqPreCursorTargetRx': {'OutputEqPreCursorTargetRx1': 3, 'OutputEqPreCursorTargetRx2': 3, 'OutputEqPreCursorTargetRx3': 3, 'OutputEqPreCursorTargetRx4': 3, 'OutputEqPreCursorTargetRx5': 3, 'OutputEqPreCursorTargetRx6': 3, 'OutputEqPreCursorTargetRx7': 3, 'OutputEqPreCursorTargetRx8': 3}, 'OutputEqPostCursorTargetRx': {'OutputEqPostCursorTargetRx1': 0, 'OutputEqPostCursorTargetRx2': 0, 'OutputEqPostCursorTargetRx3': 0, 'OutputEqPostCursorTargetRx4': 0, 'OutputEqPostCursorTargetRx5': 0, 'OutputEqPostCursorTargetRx6': 0, 'OutputEqPostCursorTargetRx7': 0, 'OutputEqPostCursorTargetRx8': 0}, 'OutputAmplitudeTargetRx': {'OutputAmplitudeTargetRx1': 2, 'OutputAmplitudeTargetRx2': 2, 'OutputAmplitudeTargetRx3': 2, 'OutputAmplitudeTargetRx4': 2, 'OutputAmplitudeTargetRx5': 2, 'OutputAmplitudeTargetRx6': 2, 'OutputAmplitudeTargetRx7': 2, 'OutputAmplitudeTargetRx8': 2}}

Jul  5 20:46:23.365141 sonic INFO pmon#supervisord: xcvrd ERROR:sonic_platform_base.sonic_xcvr.api.public.cmis:ANOOP print new SCS: {'AdaptiveInputEqEnableTx': {'AdaptiveInputEqEnableTx1': 1, 'AdaptiveInputEqEnableTx2': 1, 'AdaptiveInputEqEnableTx3': 1, 'AdaptiveInputEqEnableTx4': 1, 'AdaptiveInputEqEnableTx5': 1, 'AdaptiveInputEqEnableTx6': 1, 'AdaptiveInputEqEnableTx7': 1, 'AdaptiveInputEqEnableTx8': 1}, 'AdaptiveInputEqRecalledTx': {'AdaptiveInputEqRecalledTx1': 0, 'AdaptiveInputEqRecalledTx2': 0, 'AdaptiveInputEqRecalledTx3': 0, 'AdaptiveInputEqRecalledTx4': 0, 'AdaptiveInputEqRecalledTx5': 0, 'AdaptiveInputEqRecalledTx6': 0, 'AdaptiveInputEqRecalledTx7': 0, 'AdaptiveInputEqRecalledTx8': 0}, 'FixedInputEqTargetTx': {'FixedInputEqTargetTx1': 3, 'FixedInputEqTargetTx2': 3, 'FixedInputEqTargetTx3': 3, 'FixedInputEqTargetTx4': 3, 'FixedInputEqTargetTx5': 3, 'FixedInputEqTargetTx6': 3, 'FixedInputEqTargetTx7': 3, 'FixedInputEqTargetTx8': 3}, 'CDREnableTx': {'CDREnableTx1': 1, 'CDREnableTx2': 1, 'CDREnableTx3': 1, 'CDREnableTx4': 1, 'CDREnableTx5': 1, 'CDREnableTx6': 1, 'CDREnableTx7': 1, 'CDREnableTx8': 1}, 'CDREnableRx': {'CDREnableRx1': 1, 'CDREnableRx2': 1, 'CDREnableRx3': 1, 'CDREnableRx4': 1, 'CDREnableRx5': 1, 'CDREnableRx6': 1, 'CDREnableRx7': 1, 'CDREnableRx8': 1}, 'OutputEqPreCursorTargetRx': {'OutputEqPreCursorTargetRx1': 3, 'OutputEqPreCursorTargetRx2': 3, 'OutputEqPreCursorTargetRx3': 3, 'OutputEqPreCursorTargetRx4': 3, 'OutputEqPreCursorTargetRx5': 3, 'OutputEqPreCursorTargetRx6': 3, 'OutputEqPreCursorTargetRx7': 3, 'OutputEqPreCursorTargetRx8': 3}, 'OutputEqPostCursorTargetRx': {'OutputEqPostCursorTargetRx1': 0, 'OutputEqPostCursorTargetRx2': 0, 'OutputEqPostCursorTargetRx3': 0, 'OutputEqPostCursorTargetRx4': 0, 'OutputEqPostCursorTargetRx5': 0, 'OutputEqPostCursorTargetRx6': 0, 'OutputEqPostCursorTargetRx7': 0, 'OutputEqPostCursorTargetRx8': 0}, 'OutputAmplitudeTargetRx': {'OutputAmplitudeTargetRx1': 2, 'OutputAmplitudeTargetRx2': 2, 'OutputAmplitudeTargetRx3': 2, 'OutputAmplitudeTargetRx4': 2, 'OutputAmplitudeTargetRx5': 2, 'OutputAmplitudeTargetRx6': 2, 'OutputAmplitudeTargetRx7': 2, 'OutputAmplitudeTargetRx8': 2}}


root@sonic:/home/cisco# sfputil show eeprom-hexdump -n 10 -p Ethernet124
EEPROM hexdump for port Ethernet124 page 10h
        Lower page 0h
        00000000 18 50 04 06 01 00 00 00  00 00 00 00 00 00 2d 96 |.P............-.|
        00000010 82 00 fa 24 36 fb 00 00  3d 00 20 00 00 00 00 00 |...$6...=. .....|
        00000020 00 00 00 00 00 01 00 5e  03 00 00 00 00 00 00 00 |.......^........|
        00000030 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        00000040 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        00000050 00 00 00 00 00 02 52 00  88 01 51 00 88 01 50 1c |......R...Q...P.|
        00000060 44 11 4f 1c 44 11 4c 15  11 ff 4b 15 11 ff ff 00 |D.O.D.L...K.....|
        00000070 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|

        Upper page 10h
        00000080 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        00000090 00 31 31 31 31 39 39 39  39 ff 00 00 33 33 33 33 |.11119999...3333|
        000000a0 ff ff 33 33 33 33 00 00  00 00 22 22 22 22 00 00 |..3333....""""..|
        000000b0 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        000000c0 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        000000d0 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        000000e0 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        000000f0 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|

root@sonic:/home/cisco# sfputil show eeprom-hexdump -n 11 -p Ethernet124
EEPROM hexdump for port Ethernet124 page 11h
        Lower page 0h
        00000000 18 50 04 06 01 00 00 00  00 00 00 00 00 00 2d 96 |.P............-.|
        00000010 81 f4 fa b3 37 03 00 00  3d 00 20 00 00 00 00 00 |....7...=. .....|
        00000020 00 00 00 00 00 01 00 5e  03 00 00 00 00 00 00 00 |.......^........|
        00000030 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        00000040 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
        00000050 00 00 00 00 00 02 52 00  88 01 51 00 88 01 50 1c |......R...Q...P.|
        00000060 44 11 4f 1c 44 11 4c 15  11 ff 4b 15 11 ff ff 00 |D.O.D.L...K.....|
        00000070 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|

        Upper page 11h
        00000080 44 44 44 44 ff ff ff 00  00 00 00 00 00 00 00 00 |DDDD............|
        00000090 00 00 00 00 00 00 00 00  00 ff 45 6c 37 27 3f 4c |..........El7'?L|
        000000a0 3c 19 3f 8b 39 da 41 28  3a b0 85 ca 81 e2 88 b8 |<.?.9.A(:.......|
        000000b0 84 d0 88 b8 84 d0 88 b8  98 58 3b 21 3e 0a 3f cb |.........X;!>.?.|
        000000c0 3e b2 42 3f 46 b4 3e 52  3d 8f 11 11 11 11 31 31 |>.B?F.>R=.....11|
        000000d0 31 31 39 39 39 39 ff 00  00 33 33 33 33 ff ff 33 |119999...3333..3|
        000000e0 33 33 33 00 00 00 00 22  22 22 22 00 00 00 00 00 |333...."""".....|
        000000f0 11 12 13 14 15 16 17 18  11 12 13 14 15 16 17 18 |................|

Additional Information (Optional)

Copy link

@jaganbal-a jaganbal-a left a comment

Choose a reason for hiding this comment

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

Please write the appropriate test code to cover the new APIs/changes

@prgeor prgeor requested a review from keboliu July 12, 2023 16:09
@prgeor
Copy link
Collaborator

prgeor commented Jul 12, 2023

@keboliu @mihirpat1 please review

@prgeor prgeor added the CMIS label Jul 12, 2023
@prgeor
Copy link
Collaborator

prgeor commented Jul 12, 2023

@AnoopKamath can you point to the HLD in this PR description?

@AnoopKamath
Copy link
Contributor Author

@AnoopKamath can you point to the HLD in this PR description?

@prgeor I have added reference to HLD and CMIS changes also. Thanks

@AnoopKamath AnoopKamath changed the title Optics SI settings for CMIS changes for platform daemon Apply custom Si settings via CMIS: SONiC xcvrd platform daemon changes Jul 14, 2023
@shivuv
Copy link

shivuv commented Jul 18, 2023

@prgeor : If there are no comments, please approve.

sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Outdated Show resolved Hide resolved
sonic-xcvrd/xcvrd/xcvrd.py Show resolved Hide resolved

optics_si_settings_file_path = os.path.join(platform_path, "optics_si_settings.json")
if not os.path.isfile(optics_si_settings_file_path):
helper_logger.log_error("No optics SI file exists")
Copy link
Collaborator

Choose a reason for hiding this comment

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

@AnoopKamath why is this error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor : Changed it for debugging. Will revert to info

if vendor_key is None or vendor_name is None:
helper_logger.log_error("Error: No Vendor Key found for port '{}'".format(logical_port_name))
return optics_si
optics_si = get_optics_si_settings_value(physical_port, lane_speed, vendor_key, vendor_name)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@AnoopKamath what is vendor_key? if PN please rename the variable accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor : vendor_key is combination of vendor_pn + vendor_name. We use vendor_name for vendor name search only

optics_si_dict = optics_si_parser.fetch_optics_si_setting(pport, lane_speed, sfp)

if optics_si_dict:
self.log_notice("{}: Optics SI found. Apply".format(lport))
Copy link
Collaborator

Choose a reason for hiding this comment

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

@AnoopKamath can we log the vendor_key and the lane speed also in the log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor: Sure. Will do it

@prgeor prgeor merged commit 816059b into sonic-net:master Aug 16, 2023
@prgeor
Copy link
Collaborator

prgeor commented Aug 16, 2023

@StormLiangMS please cherry pick to 202305

@mihirpat1
Copy link
Contributor

@StormLiangMS please cherry pick to 202305

ADO - 24988570

tshalvi pushed a commit to tshalvi/sonic-platform-daemons that referenced this pull request Sep 11, 2023
StormLiangMS pushed a commit that referenced this pull request Sep 21, 2023
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.

7 participants