Skip to content

[Mellanox] Add phcsync script for ASIC clock synchronization#24972

Merged
liat-grozovik merged 4 commits intosonic-net:masterfrom
zili11720:hft_sync_clock
Jan 19, 2026
Merged

[Mellanox] Add phcsync script for ASIC clock synchronization#24972
liat-grozovik merged 4 commits intosonic-net:masterfrom
zili11720:hft_sync_clock

Conversation

@zili11720
Copy link
Contributor

@zili11720 zili11720 commented Jan 5, 2026

Why I did it

Fix a bug in HFT where the asic clock was not synchronized with the system clock, causing it to report a time around 1970.

There is a dependency between this PR and: sonic-net/sonic-sairedis#1734
The PR to sonic-buildimage should be merged first, followed by the PR to sonic-sairedis.

Work item tracking
  • Microsoft ADO (number only):

How I did it

Added phcsync script for ASIC clock synchronization on Mellanox platforms: created phcsync.sh that syncs PTP clocks with system clock every 60 seconds.

How to verify it

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)

@zili11720 zili11720 requested a review from lguohan as a code owner January 5, 2026 08:10
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Zili Bombach <zbombach@nvidia.com>
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zili11720 zili11720 changed the title [Mellanox] Add phcsync script for ASIC clock synchronization on mellanox platforms [Mellanox] [202511] Add phcsync script for ASIC clock synchronization on mellanox platforms Jan 5, 2026
@zili11720 zili11720 changed the title [Mellanox] [202511] Add phcsync script for ASIC clock synchronization on mellanox platforms [Mellanox] Add phcsync script for ASIC clock synchronization on mellanox platforms Jan 5, 2026
@liat-grozovik
Copy link
Collaborator

@zili11720 is there depdency between PRs? if so, please share what must be first and what will happen if they are not.

liat-grozovik
liat-grozovik previously approved these changes Jan 7, 2026
@liat-grozovik liat-grozovik changed the title [Mellanox] Add phcsync script for ASIC clock synchronization on mellanox platforms [Mellanox] Add phcsync script for ASIC clock synchronization Jan 7, 2026
@zili11720
Copy link
Contributor Author

There is a dependency between the PRs.
The PR to sonic-buildimage should be merged first, followed by the PR to sonic-sairedis.

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Zili Bombach <zbombach@nvidia.com>
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@Pterosaur Pterosaur left a comment

Choose a reason for hiding this comment

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

lgtm

@liat-grozovik liat-grozovik merged commit 4f67b12 into sonic-net:master Jan 19, 2026
13 checks passed
@r12f
Copy link
Contributor

r12f commented Jan 20, 2026

Pick to 202412: Azure/sonic-buildimage-msft#1935

SahilChaudhari pushed a commit to SahilChaudhari/sonic-buildimage-sonic-net that referenced this pull request Jan 21, 2026
…et#24972)

- Why I did it
Fix a bug in HFT where the asic clock was not synchronized with the system clock, causing it to report a time around 1970.

There is a dependency between this PR and: sonic-net/sonic-sairedis#1734
The PR to sonic-buildimage should be merged first, followed by the PR to sonic-sairedis.

- How I did it
Added phcsync script for ASIC clock synchronization on Mellanox platforms: created phcsync.sh that syncs PTP clocks with system clock every 60 seconds.

- How to verify it
Which release branch to backport (provide reason below if selected)


Signed-off-by: Zili Bombach <zbombach@nvidia.com>

* Added error logs to phcsync.sh and made phcsync.sh executable

Signed-off-by: Zili Bombach <zbombach@nvidia.com>

---------

Signed-off-by: Zili Bombach <zbombach@nvidia.com>
Co-authored-by: Liat Grozovik <44433539+liat-grozovik@users.noreply.github.com>
spandan-nexthop pushed a commit to spandan-nexthop/sonic-buildimage that referenced this pull request Feb 15, 2026
…et#24972)

- Why I did it
Fix a bug in HFT where the asic clock was not synchronized with the system clock, causing it to report a time around 1970.

There is a dependency between this PR and: sonic-net/sonic-sairedis#1734
The PR to sonic-buildimage should be merged first, followed by the PR to sonic-sairedis.

- How I did it
Added phcsync script for ASIC clock synchronization on Mellanox platforms: created phcsync.sh that syncs PTP clocks with system clock every 60 seconds.

- How to verify it
Which release branch to backport (provide reason below if selected)


Signed-off-by: Zili Bombach <zbombach@nvidia.com>

* Added error logs to phcsync.sh and made phcsync.sh executable

Signed-off-by: Zili Bombach <zbombach@nvidia.com>

---------

Signed-off-by: Zili Bombach <zbombach@nvidia.com>
Co-authored-by: Liat Grozovik <44433539+liat-grozovik@users.noreply.github.com>
baorliu pushed a commit to baorliu/sonic-buildimage that referenced this pull request Feb 24, 2026
…et#24972)

- Why I did it
Fix a bug in HFT where the asic clock was not synchronized with the system clock, causing it to report a time around 1970.

There is a dependency between this PR and: sonic-net/sonic-sairedis#1734
The PR to sonic-buildimage should be merged first, followed by the PR to sonic-sairedis.

- How I did it
Added phcsync script for ASIC clock synchronization on Mellanox platforms: created phcsync.sh that syncs PTP clocks with system clock every 60 seconds.

- How to verify it
Which release branch to backport (provide reason below if selected)


Signed-off-by: Zili Bombach <zbombach@nvidia.com>

* Added error logs to phcsync.sh and made phcsync.sh executable

Signed-off-by: Zili Bombach <zbombach@nvidia.com>

---------

Signed-off-by: Zili Bombach <zbombach@nvidia.com>
Co-authored-by: Liat Grozovik <44433539+liat-grozovik@users.noreply.github.com>
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.

8 participants