Skip to content

[sonic_xcvr] Use advertised timeouts for CDB firmware commands#681

Open
pnakka28 wants to merge 1 commit into
sonic-net:masterfrom
pnakka28:cdb_max_duration
Open

[sonic_xcvr] Use advertised timeouts for CDB firmware commands#681
pnakka28 wants to merge 1 commit into
sonic-net:masterfrom
pnakka28:cdb_max_duration

Conversation

@pnakka28
Copy link
Copy Markdown
Contributor

Description

Use module advertised timeouts for CDB firmware commands. This change parses the MaxDuration fields and uses them as per-command timeouts for firmware operations. These timeouts are passed to the Start, Abort, Write, and Complete firmware commands. Commands without a spec defined MaxDuration continue to use the default timeout. Unit tests have been updated accordingly.

Motivation and Context

The CDB firmware commands previously used a default timeout for all operations. However, per CMIS spec, modules advertise per command MaxDuration values, and commands can have different execution times. This change ensures to respect module advertised timing constraints as defined in the CMIS specification.

How Has This Been Tested?

  • Tested the changes on a device performing a full firmware download and activation cycle
  • Confirmed MaxDuration values are correctly parsed from the module
  • Firmware download and activation completed successfully using module advertised timeouts
  • Updated unit tests in test_cdb_fw.py and test_cdb.py pass with new timeout parameters
root@sonic:~# sfputil firmware upgrade EthernetXX "/path/to/firmware.bin"
Image A Version: 1.5.0
Image B Version: 1.4.0
Factory Image Version: 1.6.0
Running Image: B
Committed Image: B
Active Firmware: 1.4.0
Inactive Firmware: 1.5.0

CDB: Starting firmware download
Downloading ...  [###################################-]   99%  00:00:00
CDB: firmware download complete
Firmware download complete success
Running firmware: Non-hitless Reset to Inactive Image
Firmware run in mode 0 successful
FW images switch successful : ImageA is running
Firmware commit successful

Additional Information (Optional)

MSFT ADO - 38035182

Signed-off-by: Pavan Kalyan Nakka <pnakka@microsoft.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants