Gary E. Miller
2015-02-26 00:07:05 UTC
Yo All!
Different day, new results.
I just got two of these:
Intel Corporation 82574L Gigabit Network Connection
They use the e1000e driver, but report fewer capabilities to ethtool
than my i217-LM:
kong ~ # ethtool -T eth2
Time stamping parameters for eth2:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 2
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)
Hardware mode seems to work with ntpd:
# sh -v Do-ptp-test
# killall ptp4l phc2sys
ptp4l: no process found
phc2sys: no process found
# killall ptp4l phc2sys
ptp4l: no process found
phc2sys: no process found
# cat ptp.conf
[global]
clock_servo linreg
uds_address /var/run/ptp4l
# ptp4l -i eth2 -l 6 -m -f ptp.conf &
# sleep 3
ptp4l[1075.704]: selected /dev/ptp2 as PTP clock
ptp4l[1075.704]: driver changed our HWTSTAMP options
ptp4l[1075.705]: tx_type 1 not 1
ptp4l[1075.705]: rx_filter 1 not 12
ptp4l[1075.705]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[1075.705]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[1076.211]: port 1: new foreign master 003048.fffe.345fe2-1
# phc2sys -a -r -E ntpshm -m -M 2
phc2sys[1079.705]: reconfiguring after port state change
phc2sys[1079.705]: selecting eth2 for synchronization
phc2sys[1079.705]: nothing to synchronize
ptp4l[1080.211]: selected best master clock 003048.fffe.345fe2
ptp4l[1080.211]: foreign master not using PTP timescale
ptp4l[1080.211]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
phc2sys[1080.705]: port 002590.fffe.f355db-1 changed state
phc2sys[1080.705]: reconfiguring after port state change
phc2sys[1080.705]: master clock not ready, waiting...
ptp4l[1082.226]: master offset -18727 s0 freq +12157 path delay 37953
ptp4l[1083.226]: master offset -21606 s0 freq +12157 path delay 37953
ptp4l[1084.226]: master offset -30465 s0 freq +12157 path delay 43424
ptp4l[1085.226]: master offset -33206 s1 freq +6288 path delay 43424
ptp4l[1086.226]: master offset -4179 s2 freq +2178 path delay 43424
ptp4l[1086.226]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
phc2sys[1086.705]: port 002590.fffe.f355db-1 changed state
phc2sys[1086.705]: reconfiguring after port state change
phc2sys[1086.705]: selecting CLOCK_REALTIME for synchronization
phc2sys[1086.705]: selecting eth2 as the master clock
phc2sys[1086.706]: phc offset 2017 s0 freq +0 delay 6582
ptp4l[1087.226]: master offset 2814 s2 freq +8577 path delay 43424
phc2sys[1087.706]: phc offset -1975 s0 freq +0 delay 6513
ptp4l[1088.226]: master offset 8420 s2 freq +14060 path delay 38989
phc2sys[1088.706]: phc offset 48 s0 freq +0 delay 6556
ptp4l[1089.226]: master offset -6617 s2 freq +5060 path delay 48896
phc2sys[1089.706]: phc offset 558 s0 freq +0 delay 6527
ptp4l[1090.226]: master offset 1944 s2 freq +8547 path delay 44804
phc2sys[1090.706]: phc offset -2116 s0 freq +0 delay 6113
ptp4l[1091.226]: master offset 6543 s2 freq +12865 path delay 40713
phc2sys[1091.706]: phc offset -420 s0 freq +0 delay 6656
ptp4l[1092.226]: master offset 1050 s2 freq +14433 path delay 42385
phc2sys[1092.706]: phc offset 3724 s0 freq +0 delay 6120
phc2sys[1092.791]: phc offset -1882 s0 freq +0 delay 19735
So the times look good.
ntpmon shows ntpshm getting good times:
kong gpsd # ntpmon
sample NTP2 1424906561.648842149 1424906561.544090246 1424906561.544098174 0 -30
sample NTP2 1424906562.545280731 1424906562.544236791 1424906562.544243340 0 -30
sample NTP2 1424906563.545125632 1424906563.544377748 1424906563.544381591 0 -30
sample NTP2 1424906564.545161448 1424906564.544545477 1424906564.544546037 0 -30
sample NTP2 1424906564.965674501 1424906564.965073008 1424906564.965078572 0 -30
sample NTP2 1424906577.747901488 1424906577.746959372 1424906577.746957355 0 -30
sample NTP2 1424906578.747597601 1424906578.747086914 1424906578.747088889 0 -30
sample NTP2 1424906579.748152844 1424906579.747224639 1424906579.747224591 0 -30
sample NTP2 1424906580.747688039 1424906580.747367552 1424906580.747366994 0 -30
sample NTP2 1424906581.748464762 1424906581.747523310 1424906581.747525426 0 -30
sample NTP2 1424906582.748521691 1424906582.747689166 1424906582.747689586 0 -30
sample NTP2 1424906583.748467526 1424906583.747841769 1424906583.747838045 0 -30
sample NTP2 1424906583.833281041 1424906583.832562220 1424906583.832564102 0 -30
But nothing showing up in chronyc???
Hmm:
# ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x4e545030 0 root 600 96 2
0x4e545031 32769 root 600 96 2
0x4e545032 65538 root 600 96 2
^^^
Ah. I started phc2sys before chronyd and phc2sys created the ntpshm with
the wrong permissions! NTP2 should be perms 666, not 600. That should
be an easy bug to fix.
So, stop everything, and change to a new ntpd that can read from a 600
And now ntpd is reading, and syncing, to my SHM.
My host did not change, no software updates, no change to my test scripts,
and the same e1000e driver. The only change is the replacement of the
i217 -LM with the 82574L NIC.
So, that's two bugs to fix: broken i217-LM, and broken SHM permissions.
Until the SHM is fixed working with chronyd is problematic for SHMs 2
and up.
And until the i217-LM is fixed it should be documented in the README
as broken.
To soon to tell, but the jitter seems pretty aweful. Maybe 2 mSec?
Time will tell, maybe it will settle down. I had hoped hardware mode
would actually be better than software mode. Maybe it will converge
over night? In general ntpd converges much worse than chronyd so that
could be part of the issue.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
***@rellim.com Tel:+1(541)382-8588
Different day, new results.
I just got two of these:
Intel Corporation 82574L Gigabit Network Connection
They use the e1000e driver, but report fewer capabilities to ethtool
than my i217-LM:
kong ~ # ethtool -T eth2
Time stamping parameters for eth2:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 2
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)
Hardware mode seems to work with ntpd:
# sh -v Do-ptp-test
# killall ptp4l phc2sys
ptp4l: no process found
phc2sys: no process found
# killall ptp4l phc2sys
ptp4l: no process found
phc2sys: no process found
# cat ptp.conf
[global]
clock_servo linreg
uds_address /var/run/ptp4l
# ptp4l -i eth2 -l 6 -m -f ptp.conf &
# sleep 3
ptp4l[1075.704]: selected /dev/ptp2 as PTP clock
ptp4l[1075.704]: driver changed our HWTSTAMP options
ptp4l[1075.705]: tx_type 1 not 1
ptp4l[1075.705]: rx_filter 1 not 12
ptp4l[1075.705]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[1075.705]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[1076.211]: port 1: new foreign master 003048.fffe.345fe2-1
# phc2sys -a -r -E ntpshm -m -M 2
phc2sys[1079.705]: reconfiguring after port state change
phc2sys[1079.705]: selecting eth2 for synchronization
phc2sys[1079.705]: nothing to synchronize
ptp4l[1080.211]: selected best master clock 003048.fffe.345fe2
ptp4l[1080.211]: foreign master not using PTP timescale
ptp4l[1080.211]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
phc2sys[1080.705]: port 002590.fffe.f355db-1 changed state
phc2sys[1080.705]: reconfiguring after port state change
phc2sys[1080.705]: master clock not ready, waiting...
ptp4l[1082.226]: master offset -18727 s0 freq +12157 path delay 37953
ptp4l[1083.226]: master offset -21606 s0 freq +12157 path delay 37953
ptp4l[1084.226]: master offset -30465 s0 freq +12157 path delay 43424
ptp4l[1085.226]: master offset -33206 s1 freq +6288 path delay 43424
ptp4l[1086.226]: master offset -4179 s2 freq +2178 path delay 43424
ptp4l[1086.226]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
phc2sys[1086.705]: port 002590.fffe.f355db-1 changed state
phc2sys[1086.705]: reconfiguring after port state change
phc2sys[1086.705]: selecting CLOCK_REALTIME for synchronization
phc2sys[1086.705]: selecting eth2 as the master clock
phc2sys[1086.706]: phc offset 2017 s0 freq +0 delay 6582
ptp4l[1087.226]: master offset 2814 s2 freq +8577 path delay 43424
phc2sys[1087.706]: phc offset -1975 s0 freq +0 delay 6513
ptp4l[1088.226]: master offset 8420 s2 freq +14060 path delay 38989
phc2sys[1088.706]: phc offset 48 s0 freq +0 delay 6556
ptp4l[1089.226]: master offset -6617 s2 freq +5060 path delay 48896
phc2sys[1089.706]: phc offset 558 s0 freq +0 delay 6527
ptp4l[1090.226]: master offset 1944 s2 freq +8547 path delay 44804
phc2sys[1090.706]: phc offset -2116 s0 freq +0 delay 6113
ptp4l[1091.226]: master offset 6543 s2 freq +12865 path delay 40713
phc2sys[1091.706]: phc offset -420 s0 freq +0 delay 6656
ptp4l[1092.226]: master offset 1050 s2 freq +14433 path delay 42385
phc2sys[1092.706]: phc offset 3724 s0 freq +0 delay 6120
phc2sys[1092.791]: phc offset -1882 s0 freq +0 delay 19735
So the times look good.
ntpmon shows ntpshm getting good times:
kong gpsd # ntpmon
sample NTP2 1424906561.648842149 1424906561.544090246 1424906561.544098174 0 -30
sample NTP2 1424906562.545280731 1424906562.544236791 1424906562.544243340 0 -30
sample NTP2 1424906563.545125632 1424906563.544377748 1424906563.544381591 0 -30
sample NTP2 1424906564.545161448 1424906564.544545477 1424906564.544546037 0 -30
sample NTP2 1424906564.965674501 1424906564.965073008 1424906564.965078572 0 -30
sample NTP2 1424906577.747901488 1424906577.746959372 1424906577.746957355 0 -30
sample NTP2 1424906578.747597601 1424906578.747086914 1424906578.747088889 0 -30
sample NTP2 1424906579.748152844 1424906579.747224639 1424906579.747224591 0 -30
sample NTP2 1424906580.747688039 1424906580.747367552 1424906580.747366994 0 -30
sample NTP2 1424906581.748464762 1424906581.747523310 1424906581.747525426 0 -30
sample NTP2 1424906582.748521691 1424906582.747689166 1424906582.747689586 0 -30
sample NTP2 1424906583.748467526 1424906583.747841769 1424906583.747838045 0 -30
sample NTP2 1424906583.833281041 1424906583.832562220 1424906583.832564102 0 -30
But nothing showing up in chronyc???
Hmm:
# ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x4e545030 0 root 600 96 2
0x4e545031 32769 root 600 96 2
0x4e545032 65538 root 600 96 2
^^^
Ah. I started phc2sys before chronyd and phc2sys created the ntpshm with
the wrong permissions! NTP2 should be perms 666, not 600. That should
be an easy bug to fix.
So, stop everything, and change to a new ntpd that can read from a 600
And now ntpd is reading, and syncing, to my SHM.
My host did not change, no software updates, no change to my test scripts,
and the same e1000e driver. The only change is the replacement of the
i217 -LM with the 82574L NIC.
So, that's two bugs to fix: broken i217-LM, and broken SHM permissions.
Until the SHM is fixed working with chronyd is problematic for SHMs 2
and up.
And until the i217-LM is fixed it should be documented in the README
as broken.
To soon to tell, but the jitter seems pretty aweful. Maybe 2 mSec?
Time will tell, maybe it will settle down. I had hoped hardware mode
would actually be better than software mode. Maybe it will converge
over night? In general ntpd converges much worse than chronyd so that
could be part of the issue.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
***@rellim.com Tel:+1(541)382-8588