Skip to content

Commit b6d9075

Browse files
authored
Update mellanox.rst
1 parent d7c3c8e commit b6d9075

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

doc/modules/mellanox.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,41 @@ Or to send from all queues and scale the transmission performance:
138138
139139
pfsend_multichannel -i mlx:mlx5_0
140140
141+
Hw Clock
142+
--------
143+
144+
ConnectX adapters provide hardware packet timestamping by using an internal clock.
145+
Please make sure the internal hardware clock (PHC) is synced with the system clock
146+
to avoid applications complaining about time shifts.
147+
148+
Install the linuxptp tool:
149+
150+
.. code-block:: console
151+
152+
apt install linuxptp
153+
154+
Read the PTP device ID for the ConnectX interface to sync:
155+
156+
.. code-block:: console
157+
158+
ethtool -T ens4f0np0 | grep 'PTP Hardware Clock'
159+
PTP Hardware Clock: 2
160+
161+
Read the current clock from the ptp device (/dev/ptp<id>):
162+
163+
.. code-block:: console
164+
165+
phc_ctl /dev/ptp2 get
166+
phc_ctl[1782789.530]: clock time is 1749026103.583312192 or Wed Jun 4 10:35:03 2025
167+
168+
Synchronize the hardware clock with the system time (or use your preferred synchronization method):
169+
170+
.. code-block:: console
171+
172+
phc2sys -s CLOCK_REALTIME -c ens4f0np0 -O 0 -m
173+
174+
(run this command for a few seconds to let it adjust the time)
175+
141176
Hw Filtering
142177
------------
143178

0 commit comments

Comments
 (0)