Bug 1643977

Summary: RFE: support for extended PTP_SYS_OFFSET ioctl in phc2sys
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Lichvar <mlichvar>
Component: linuxptpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED ERRATA QA Contact: Yalin.Li <yalli>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.6CC: atragler, mkolaja, thozza, yalli
Target Milestone: rcKeywords: FutureFeature, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: linuxptp-2.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1677217 (view as bug list) Environment:
Last Closed: 2019-08-06 13:10:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1643962    

Description Miroslav Lichvar 2018-10-29 16:30:14 UTC
Description of problem:
A new ioctl is needed to enable a more accurate synchronization of the system clock to a PHC (bug #1643974). When available, the ioctl needs to be supported by phc2sys from the linuxptp package.

Version-Release number of selected component (if applicable):
linuxptp-1.8-6.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. run phc2sys -s eth0 -m
2. observe reported delay

Actual results:
It depends on the NIC, PCIe slot, and other things, but usually the delay is about 1.5-5 microseconds.

Expected results:
Delay smaller than 1 microsecond.

Comment 2 Red Hat Bugzilla Rules Engine 2018-12-13 16:14:00 UTC
Product Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 8 Yalin.Li 2019-04-10 09:52:17 UTC
verified.
The phc2sys reported delay is about 800ns now. It's obviously reduced compared to which was about 2200ns before in the same machine.
------------------------------------------------------------------
[root@hp-dl388g8-11 ~]# uname -r
3.10.0-1034.rt56.993.el7.x86_64
[root@hp-dl388g8-10 ~]# phc2sys -v
2.0
[root@hp-dl388g8-10 ~]# 
[root@hp-dl388g8-11 ~]# ethtool -i ens5f0
driver: igb
version: 5.6.0-k
firmware-version: 1.52, 0x800007a6
expansion-rom-version: 
bus-info: 0000:24:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
[root@hp-dl388g8-11 ~]# 
[root@hp-dl388g8-11 ~]# 
[root@hp-dl388g8-11 ~]# phc2sys -arm
phc2sys[991.872]: reconfiguring after port state change
phc2sys[991.872]: selecting CLOCK_REALTIME for synchronization
phc2sys[991.872]: selecting ens5f0 as the master clock
phc2sys[991.872]: CLOCK_REALTIME phc offset   -378658 s0 freq   -7994 delay    777
phc2sys[992.873]: CLOCK_REALTIME phc offset   -414054 s1 freq  -43384 delay    792
phc2sys[993.873]: CLOCK_REALTIME phc offset       -59 s2 freq  -43443 delay    797
phc2sys[994.873]: CLOCK_REALTIME phc offset       -54 s2 freq  -43456 delay    872
phc2sys[995.873]: CLOCK_REALTIME phc offset        39 s2 freq  -43379 delay    876
phc2sys[996.873]: CLOCK_REALTIME phc offset        45 s2 freq  -43361 delay    869
phc2sys[997.873]: CLOCK_REALTIME phc offset        54 s2 freq  -43339 delay    876
phc2sys[998.873]: CLOCK_REALTIME phc offset        15 s2 freq  -43362 delay    869
phc2sys[999.873]: CLOCK_REALTIME phc offset        -3 s2 freq  -43375 delay    872
phc2sys[1000.874]: CLOCK_REALTIME phc offset        41 s2 freq  -43332 delay    782
phc2sys[1001.874]: CLOCK_REALTIME phc offset       -40 s2 freq  -43401 delay    875
phc2sys[1002.874]: CLOCK_REALTIME phc offset       -21 s2 freq  -43394 delay    869
phc2sys[1003.874]: CLOCK_REALTIME phc offset         0 s2 freq  -43379 delay    866
phc2sys[1004.874]: CLOCK_REALTIME phc offset         2 s2 freq  -43377 delay    872
phc2sys[1005.874]: CLOCK_REALTIME phc offset         9 s2 freq  -43370 delay    865
phc2sys[1006.874]: CLOCK_REALTIME phc offset       -20 s2 freq  -43396 delay    879
phc2sys[1007.874]: CLOCK_REALTIME phc offset        10 s2 freq  -43372 delay    866
phc2sys[1008.875]: CLOCK_REALTIME phc offset        70 s2 freq  -43309 delay    775
phc2sys[1009.875]: CLOCK_REALTIME phc offset       -65 s2 freq  -43423 delay    878
phc2sys[1010.875]: CLOCK_REALTIME phc offset        13 s2 freq  -43364 delay    876
phc2sys[1011.875]: CLOCK_REALTIME phc offset        -1 s2 freq  -43374 delay    872
phc2sys[1012.875]: CLOCK_REALTIME phc offset       -36 s2 freq  -43410 delay    883
phc2sys[1013.875]: CLOCK_REALTIME phc offset        -5 s2 freq  -43390 delay    872
phc2sys[1014.875]: CLOCK_REALTIME phc offset        28 s2 freq  -43358 delay    872
phc2sys[1015.875]: CLOCK_REALTIME phc offset        23 s2 freq  -43355 delay    866
phc2sys[1016.876]: CLOCK_REALTIME phc offset        42 s2 freq  -43329 delay    778
phc2sys[1017.876]: CLOCK_REALTIME phc offset       -73 s2 freq  -43431 delay    866
phc2sys[1018.876]: CLOCK_REALTIME phc offset         6 s2 freq  -43374 delay    872
phc2sys[1019.876]: CLOCK_REALTIME phc offset         2 s2 freq  -43376 delay    875
phc2sys[1020.876]: CLOCK_REALTIME phc offset        -2 s2 freq  -43380 delay    872
phc2sys[1021.876]: CLOCK_REALTIME phc offset         3 s2 freq  -43375 delay    869
phc2sys[1022.876]: CLOCK_REALTIME phc offset        -1 s2 freq  -43378 delay    869
phc2sys[1023.876]: CLOCK_REALTIME phc offset        26 s2 freq  -43352 delay    872
phc2sys[1024.877]: CLOCK_REALTIME phc offset        36 s2 freq  -43334 delay    788
phc2sys[1025.877]: CLOCK_REALTIME phc offset       -53 s2 freq  -43412 delay    872
phc2sys[1026.877]: CLOCK_REALTIME phc offset        -5 s2 freq  -43380 delay    872
phc2sys[1027.877]: CLOCK_REALTIME phc offset        10 s2 freq  -43366 delay    869
phc2sys[1028.877]: CLOCK_REALTIME phc offset       -19 s2 freq  -43392 delay    872
phc2sys[1029.877]: CLOCK_REALTIME phc offset         6 s2 freq  -43373 delay    872
phc2sys[1030.877]: CLOCK_REALTIME phc offset         5 s2 freq  -43372 delay    875
phc2sys[1031.877]: CLOCK_REALTIME phc offset        27 s2 freq  -43349 delay    879
phc2sys[1032.878]: CLOCK_REALTIME phc offset        58 s2 freq  -43310 delay    776
phc2sys[1033.878]: CLOCK_REALTIME phc offset       -70 s2 freq  -43420 delay    869
phc2sys[1034.878]: CLOCK_REALTIME phc offset         2 s2 freq  -43369 delay    865
phc2sys[1035.878]: CLOCK_REALTIME phc offset       -18 s2 freq  -43389 delay    882
phc2sys[1036.878]: CLOCK_REALTIME phc offset        -6 s2 freq  -43382 delay    869
phc2sys[1037.878]: CLOCK_REALTIME phc offset        21 s2 freq  -43357 delay    879
phc2sys[1038.878]: CLOCK_REALTIME phc offset        20 s2 freq  -43352 delay    873
phc2sys[1039.878]: CLOCK_REALTIME phc offset       -14 s2 freq  -43380 delay    872
phc2sys[1040.879]: CLOCK_REALTIME phc offset        28 s2 freq  -43342 delay    778
phc2sys[1041.879]: CLOCK_REALTIME phc offset       -40 s2 freq  -43401 delay    879
phc2sys[1042.879]: CLOCK_REALTIME phc offset       -10 s2 freq  -43383 delay    872
phc2sys[1043.879]: CLOCK_REALTIME phc offset         2 s2 freq  -43374 delay    869
phc2sys[1044.879]: CLOCK_REALTIME phc offset         2 s2 freq  -43374 delay    875
phc2sys[1045.879]: CLOCK_REALTIME phc offset        -1 s2 freq  -43376 delay    873
phc2sys[1046.879]: CLOCK_REALTIME phc offset         2 s2 freq  -43374 delay    872
phc2sys[1047.879]: CLOCK_REALTIME phc offset         5 s2 freq  -43370 delay    872
phc2sys[1048.880]: CLOCK_REALTIME phc offset        32 s2 freq  -43341 delay    775
phc2sys[1049.880]: CLOCK_REALTIME phc offset       -24 s2 freq  -43388 delay    872
phc2sys[1050.880]: CLOCK_REALTIME phc offset       -39 s2 freq  -43410 delay    872
phc2sys[1051.880]: CLOCK_REALTIME phc offset         1 s2 freq  -43382 delay    869
phc2sys[1052.880]: CLOCK_REALTIME phc offset        20 s2 freq  -43362 delay    873
phc2sys[1053.880]: CLOCK_REALTIME phc offset        80 s2 freq  -43296 delay    795
phc2sys[1054.880]: CLOCK_REALTIME phc offset        28 s2 freq  -43324 delay    796
phc2sys[1055.881]: CLOCK_REALTIME phc offset       -35 s2 freq  -43379 delay    782
phc2sys[1056.881]: CLOCK_REALTIME phc offset       -85 s2 freq  -43440 delay    869
phc2sys[1057.881]: CLOCK_REALTIME phc offset       -20 s2 freq  -43400 delay    879
phc2sys[1058.881]: CLOCK_REALTIME phc offset        -1 s2 freq  -43387 delay    879
phc2sys[1059.881]: CLOCK_REALTIME phc offset        17 s2 freq  -43369 delay    872
phc2sys[1060.881]: CLOCK_REALTIME phc offset        17 s2 freq  -43364 delay    869
phc2sys[1061.881]: CLOCK_REALTIME phc offset         9 s2 freq  -43367 delay    879
phc2sys[1062.881]: CLOCK_REALTIME phc offset        21 s2 freq  -43352 delay    876
phc2sys[1063.882]: CLOCK_REALTIME phc offset        48 s2 freq  -43319 delay    778
phc2sys[1064.882]: CLOCK_REALTIME phc offset       -52 s2 freq  -43405 delay    879
phc2sys[1065.882]: CLOCK_REALTIME phc offset       -22 s2 freq  -43390 delay    872
phc2sys[1066.882]: CLOCK_REALTIME phc offset        -3 s2 freq  -43378 delay    876
phc2sys[1067.882]: CLOCK_REALTIME phc offset        13 s2 freq  -43363 delay    872
phc2sys[1068.882]: CLOCK_REALTIME phc offset         0 s2 freq  -43372 delay    876
phc2sys[1069.882]: CLOCK_REALTIME phc offset       -20 s2 freq  -43392 delay    876
phc2sys[1070.882]: CLOCK_REALTIME phc offset        -2 s2 freq  -43380 delay    865
phc2sys[1071.883]: CLOCK_REALTIME phc offset        79 s2 freq  -43300 delay    791
phc2sys[1072.883]: CLOCK_REALTIME phc offset       -38 s2 freq  -43393 delay    876
phc2sys[1073.883]: CLOCK_REALTIME phc offset       -19 s2 freq  -43385 delay    875
phc2sys[1074.883]: CLOCK_REALTIME phc offset        -5 s2 freq  -43377 delay    872
phc2sys[1075.883]: CLOCK_REALTIME phc offset       -33 s2 freq  -43406 delay    869
phc2sys[1076.883]: CLOCK_REALTIME phc offset        22 s2 freq  -43361 delay    866
phc2sys[1077.883]: CLOCK_REALTIME phc offset        17 s2 freq  -43360 delay    872
phc2sys[1078.883]: CLOCK_REALTIME phc offset         4 s2 freq  -43368 delay    866
phc2sys[1079.884]: CLOCK_REALTIME phc offset        66 s2 freq  -43304 delay    774
phc2sys[1080.884]: CLOCK_REALTIME phc offset       -63 s2 freq  -43414 delay    869
phc2sys[1081.884]: CLOCK_REALTIME phc offset       -29 s2 freq  -43399 delay    872
phc2sys[1082.884]: CLOCK_REALTIME phc offset        17 s2 freq  -43361 delay    869
phc2sys[1083.884]: CLOCK_REALTIME phc offset        15 s2 freq  -43358 delay    865
phc2sys[1084.884]: CLOCK_REALTIME phc offset        -7 s2 freq  -43376 delay    872
phc2sys[1085.884]: CLOCK_REALTIME phc offset        -9 s2 freq  -43380 delay    869
phc2sys[1086.884]: CLOCK_REALTIME phc offset        -2 s2 freq  -43375 delay    872
phc2sys[1087.885]: CLOCK_REALTIME phc offset        19 s2 freq  -43355 delay    788
phc2sys[1088.885]: CLOCK_REALTIME phc offset       -38 s2 freq  -43406 delay    879
phc2sys[1089.885]: CLOCK_REALTIME phc offset        -8 s2 freq  -43388 delay    876
phc2sys[1090.885]: CLOCK_REALTIME phc offset        24 s2 freq  -43358 delay    875
phc2sys[1091.885]: CLOCK_REALTIME phc offset        26 s2 freq  -43349 delay    872

Comment 10 errata-xmlrpc 2019-08-06 13:10:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:2246