[202511][Mellanox]Add back mst driver start during firmware upgrade#26131
Merged
vmittal-msft merged 1 commit intosonic-net:202511from Mar 11, 2026
Merged
[202511][Mellanox]Add back mst driver start during firmware upgrade#26131vmittal-msft merged 1 commit intosonic-net:202511from
vmittal-msft merged 1 commit intosonic-net:202511from
Conversation
Signed-off-by: gpunathilell <gpunathilell@nvidia.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vmittal-msft
approved these changes
Mar 11, 2026
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
Firmware upgrade was experiencing degradation in time when the MST (Mellanox Software Tools) service was not already running. Starting MST explicitly before the upgrade (with
--with_i2cdev) and stopping it after the upgrade completes ensures predictable, faster firmware upgrade times on Mellanox/NVIDIA Spectrum and BlueField platforms.Work item tracking
How I did it
platform/mellanox/mlnx-fw-upgrade.j2:
/usr/bin/mst start --with_i2cdevonly when a firmware upgrade is actually required (insideUpgradeFW(), beforeRunFwUpdateCmd).MST_STARTEDvariable (defaultNO_PARAM); set toYES_PARAMonly when this script starts MST.Cleanup()(invoked on script exit viatrap Cleanup EXIT), runmst stoponly ifMST_STARTEDisYES_PARAM, so we do not stop MST when the script did not start it (e.g. when FW was already up to date, dry-run, or early exit).mst stopwhen MST was never started by the script.-m/--ignore-mst-start-failureand variableIGNORE_MST_START_FAILURE. When set, a failedmst startdoes not exit the script (mst start ... || true); when not set,RunCmdis used and the script exits on failure. This allows environments (e.g. BlueField driver install) where MST/driver may not be ready to still attempt firmware upgrade without failing the whole flow.platform/nvidia-bluefield/installer/install.sh.j2:
-m -v:mlnx-fw-upgrade.sh -m -v(andmlnx-fw-upgrade.sh -m -v -rfor config reset). The-mflag ignores MST start failure so that if the driver/MST is not ready during install, the script does not exit and the upgrade can still proceed or fail on actual FW update rather than on driver start.How to verify it
mlnx-fw-upgrade.sh -vor image upgrade flow). Confirm upgrade time is improved when MST is not pre-started; confirmmst stopruns after upgrade (check logs). Run with FW already up to date and confirmmst stopis not executed.mlnx-fw-upgrade.sh -m -v. Verify firmware upgrade completes in expected time; if MST start fails (e.g. driver not ready), script should continue and not exit until actual FW update is attempted. Confirm MST is started/stopped when start succeeds.mlnx-fw-upgrade.sh -m -vin an environment wheremst startcan fail; script should not exit on that failure and should proceed to FW upgrade (or fail on upgrade itself).mlnx-fw-upgrade.sh -dor on QEMU/SimX; confirm script exits without callingmst stop.Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Start MST before Mellanox/NVIDIA firmware upgrade and stop it after completion to fix upgrade time degradation; add -m to ignore MST start failure (used by BlueField installer).
Link to config_db schema for YANG module changes
N/A – no YANG/config_db changes.
A picture of a cute animal (not mandatory but encouraged)