Skip to content

[Mellanox] [SONiC BMC] Support BMC side and align host side for usb0 configuration#27750

Open
benle7 wants to merge 1 commit into
sonic-net:masterfrom
benle7:host_bmc_communication
Open

[Mellanox] [SONiC BMC] Support BMC side and align host side for usb0 configuration#27750
benle7 wants to merge 1 commit into
sonic-net:masterfrom
benle7:host_bmc_communication

Conversation

@benle7

@benle7 benle7 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Why I did it

This change enables SONiC BMC USB link configuration on Mellanox Switch-BMC platforms and aligns
Switch-Host detection logic with the new runtime BMC infrastructure. The goal is to use consistent
role-based checks (switch_host / switch_bmc) and runtime BMC data, instead of legacy platform-file
presence assumptions.

Work item tracking
  • Microsoft ADO (number only):

How I did it

  • Added BMC-side platform data for AST2700:
    • device/aspeed/arm64-aspeed_nvidia_ast2700_bmc-r0/bmc.json
    • updated device/aspeed/arm64-aspeed_nvidia_ast2700_bmc-r0/platform_env.conf to switch_bmc=1
  • Added host-side role markers:
    • device/mellanox/x86_64-nvidia_sn6600_ld-r0/platform_env.conf with switch_host=1
    • device/mellanox/x86_64-nvidia_sn6810_ld-r0/platform_env.conf with switch_host=1
  • Updated Mellanox platform API logic to use the new host/runtime detection path:
    • device_data.is_platform_with_bmc() now checks is_switch_host() + get_bmc_data()
    • bmc.py now gates _get_bmc_values() via DeviceDataManager.is_platform_with_bmc()
    • component.py CPLD aux-power path now uses DeviceDataManager.is_platform_with_bmc()
  • Aligned unit tests with the new detection path:
    • tests/test_bmc.py
    • tests/test_component.py

How to verify it

  • Switch-Host side:
    • verify platform_env.conf has switch_host=1
    • verify /etc/sonic/bmc.json is present after boot
    • verify usb0 comes up with host-side IP from bmc_if_addr
    • verify host <-> BMC ping on the USB link
  • Switch-BMC side:
    • verify platform_env.conf has switch_bmc=1
    • verify /etc/sonic/bmc.json is present after boot
    • verify usb0 uses BMC-side IP from bmc_addr
    • verify BMC <-> host ping on the USB link
  • Run relevant unit tests:
    • pytest platform/mellanox/mlnx-platform-api/tests/test_bmc.py
    • pytest platform/mellanox/mlnx-platform-api/tests/test_component.py

Which release branch to backport (provide reason below if selected)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Ben Levi <belevi@nvidia.com>
@benle7 benle7 requested a review from lguohan as a code owner June 7, 2026 06:54
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@benle7 benle7 requested a review from oleksandrivantsiv June 8, 2026 07:17
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.

3 participants