Skip to content

[sonic-py-common]: Derive system MAC from base MAC for Micas platforms#28599

Open
ArthurMicas wants to merge 1 commit into
sonic-net:masterfrom
ArthurMicas:fix/micas-system-mac
Open

[sonic-py-common]: Derive system MAC from base MAC for Micas platforms#28599
ArthurMicas wants to merge 1 commit into
sonic-net:masterfrom
ArthurMicas:fix/micas-system-mac

Conversation

@ArthurMicas

@ArthurMicas ArthurMicas commented Jul 23, 2026

Copy link
Copy Markdown

Why I did it

Micas platforms require the system MAC to be derived from the platform
base MAC plus one. This follows the platform MAC allocation requirement
and avoids using the unmodified base MAC as the system MAC.

Work item tracking
  • Microsoft ADO (number only):

How I did it

  • Added a Micas platform check after the existing Centec adjustment.
  • Used an elif so the MAC can be incremented at most once.
  • Added unit coverage for Micas Broadcom and Micas Centec ARM64 platforms.

How to verify it

Run the targeted unit tests:

python3 -m pytest tests/device_info_test.py -v -k get_system_mac_for_micas

On a Micas device, compare the platform base MAC with the configured
system MAC and verify that the system MAC is base MAC plus one. Actual
device MAC addresses are intentionally redacted.

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

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608

Tracking issue/work item for backport/cherry-pick request (GitHub issue or Microsoft ADO):
N/A

Failure type: N/A

Tested branch

  • master
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • 202608
  • N/A

Test result

  • python3 -m py_compile: PASS
  • git diff --check: PASS
  • Added Micas Broadcom and Micas Centec ARM64 unit tests.
  • Full pytest execution was not available in the local environment;
    PR CI validation is pending.
  • Expected hardware result: the observed system MAC equals the platform
    base MAC plus one. Actual MAC addresses are redacted.

Description for the changelog

Derive the system MAC from the base MAC plus one on Micas platforms.

Link to config_db schema for YANG module changes

N/A

Signed-off-by: arthur <arthur@micasnetworks.com>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

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