Thread: [Linuxptp-users] use of linuxptp as a g.8275.2 Telecom slave?
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Dan G. <da...@po...> - 2019-01-02 15:40:54
|
Greetings, all. I've been using ptp for a couple years now, almost exclusively with hardware-based appliances doing G.8275.2 v4/v6 unicast in a telecom environment. I'd like to be able to extend ptp to some of our chipset-capable enterprise NTP infrastructure but can't find a good reference for how to do so. Based on some of the historic threads, I know the mode is supposed to be supported, but all the OS distribution howtos focus on multicast discovery/delivery and very little on unicast or end2end. Has anyone successfully gotten a unicast PTP slave (v4 or v6) running in a deployed environment and would you mind sharing some configuration snippets? Thanks. Dan -- Dan Geist |
From: Richard C. <ric...@gm...> - 2019-01-03 06:42:46
|
On Wed, Jan 02, 2019 at 03:20:58PM +0000, Dan Geist wrote: > Greetings, all. I've been using ptp for a couple years now, almost > exclusively with hardware-based appliances doing G.8275.2 v4/v6 > unicast in a telecom environment. I'd like to be able to extend ptp > to some of our chipset-capable enterprise NTP infrastructure but > can't find a good reference for how to do so. Based on some of the > historic threads, I know the mode is supposed to be supported, but > all the OS distribution howtos focus on multicast discovery/delivery > and very little on unicast or end2end. G.8275.2 is fully supported as of v2.0. See the example configuration file in configs/G.8275.2.cfg in the source tree. Cheers, Richard |
From: Dan G. <da...@po...> - 2019-01-03 16:59:00
|
Thanks Richard. I THINK I have things up and running correctly, but am still not sure why syncing system clock (and status utilities) aren't working. Here's my relevant config: ---------------------------------------- # # default stuff up here # # # G.8275.2 Options # dataset_comparison G.8275.x G.8275.defaultDS.localPriority 128 masterOnly 0 G.8275.portDS.localPriority 128 domainNumber 44 hybrid_e2e 1 inhibit_multicast_service 1 unicast_listen 1 unicast_req_duration 60 summary_interval 4 [unicast_master_table] table_id 1 logQueryInterval 2 UDPv4 XX.191.49.132 UDPv4 XX.191.49.133 [em2.98] unicast_master_table 1 -------------------------------------- The two indicated sources are GPS-based grandmasters and are reporting equal delay_resp and delay_req message rates. On the linuxptp host, ptp4l seems to be working but the phc2sys is waiting indefinitely: root@psp6esxd04:/etc# systemctl restart ptp4l && tail -f /var/log/syslog | grep ptp Jan 3 11:56:46 psp6esxd04 ptp4l: [6006.750] selected /dev/ptp1 as PTP clock Jan 3 11:56:46 psp6esxd04 ptp4l: [6006.750] port 0: hybrid_e2e only works with E2E Jan 3 11:56:46 psp6esxd04 ptp4l: [6006.751] port 1: INITIALIZING to LISTENING on INIT_COMPLETE Jan 3 11:56:46 psp6esxd04 ptp4l: [6006.751] port 0: INITIALIZING to LISTENING on INIT_COMPLETE Jan 3 11:56:46 psp6esxd04 ptp4l: [6007.077] port 1: new foreign master 0080ea.fffe.8c2430-1 Jan 3 11:56:47 psp6esxd04 phc2sys: [6007.753] Waiting for ptp4l... Jan 3 11:56:48 psp6esxd04 ptp4l: [6008.144] port 1: new foreign master 0080ea.fffe.8c2100-1 Jan 3 11:56:48 psp6esxd04 phc2sys: [6008.754] Waiting for ptp4l... Jan 3 11:56:49 psp6esxd04 phc2sys: [6009.755] Waiting for ptp4l... Jan 3 11:56:50 psp6esxd04 phc2sys: [6010.756] Waiting for ptp4l... Jan 3 11:56:50 psp6esxd04 ptp4l: [6011.076] selected best master clock 0080ea.fffe.8c2430 Jan 3 11:56:50 psp6esxd04 ptp4l: [6011.077] updating UTC offset to 37 Jan 3 11:56:50 psp6esxd04 ptp4l: [6011.077] port 1: LISTENING to UNCALIBRATED on RS_SLAVE Jan 3 11:56:51 psp6esxd04 phc2sys: [6011.757] Waiting for ptp4l... Jan 3 11:56:52 psp6esxd04 ptp4l: [6012.144] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:56:52 psp6esxd04 ptp4l: [6012.144] updating UTC offset to 37 Jan 3 11:56:52 psp6esxd04 phc2sys: [6012.759] Waiting for ptp4l... Jan 3 11:56:53 psp6esxd04 phc2sys: [6013.760] Waiting for ptp4l... Jan 3 11:56:54 psp6esxd04 ptp4l: [6014.399] port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED Jan 3 11:56:54 psp6esxd04 phc2sys: [6014.761] Waiting for ptp4l... Jan 3 11:56:54 psp6esxd04 ptp4l: [6015.076] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:56:54 psp6esxd04 ptp4l: [6015.077] updating UTC offset to 37 Jan 3 11:56:55 psp6esxd04 phc2sys: [6015.762] Waiting for ptp4l... Jan 3 11:56:56 psp6esxd04 phc2sys: [6016.763] Waiting for ptp4l... Jan 3 11:56:57 psp6esxd04 phc2sys: [6017.764] Waiting for ptp4l... Jan 3 11:56:58 psp6esxd04 phc2sys: [6018.766] Waiting for ptp4l... Jan 3 11:56:58 psp6esxd04 ptp4l: [6019.076] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:56:58 psp6esxd04 ptp4l: [6019.077] updating UTC offset to 37 Jan 3 11:56:59 psp6esxd04 phc2sys: [6019.767] Waiting for ptp4l... Jan 3 11:57:00 psp6esxd04 phc2sys: [6020.768] Waiting for ptp4l... Jan 3 11:57:01 psp6esxd04 phc2sys: [6021.769] Waiting for ptp4l... Jan 3 11:57:02 psp6esxd04 phc2sys: [6022.770] Waiting for ptp4l... Jan 3 11:57:02 psp6esxd04 ptp4l: [6023.076] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:57:02 psp6esxd04 ptp4l: [6023.077] updating UTC offset to 37 and pmc just seems to do nothing: root@psp6esxd04:/etc# /usr/local/sbin/pmc -u -b 0 'GET TIME_STATUS_NP' sending: GET TIME_STATUS_NP Hopefully, I'm just missing something obvious due to unfamiliarity. Any thoughts here? Thanks Dan ----- On Jan 3, 2019, at 1:42 AM, Richard Cochran ric...@gm... wrote: > > G.8275.2 is fully supported as of v2.0. See the example configuration > file in configs/G.8275.2.cfg in the source tree. > > Cheers, > Richard -- Dan Geist |
From: Richard C. <ric...@gm...> - 2019-01-03 17:25:05
|
On Thu, Jan 03, 2019 at 04:58:35PM +0000, Dan Geist wrote: > summary_interval 4 Leave this at zero for debugging, so you can see the synchronization messages. Looking at the ptp4l logs: Jan 3 11:56:50 psp6esxd04 ptp4l: [6011.077] port 1: LISTENING to UNCALIBRATED on RS_SLAVE Jan 3 11:56:52 psp6esxd04 ptp4l: [6012.144] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:56:52 psp6esxd04 ptp4l: [6012.144] updating UTC offset to 37 Jan 3 11:56:54 psp6esxd04 ptp4l: [6014.399] port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED Jan 3 11:56:54 psp6esxd04 ptp4l: [6015.076] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:56:54 psp6esxd04 ptp4l: [6015.077] updating UTC offset to 37 Jan 3 11:56:58 psp6esxd04 ptp4l: [6019.076] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:56:58 psp6esxd04 ptp4l: [6019.077] updating UTC offset to 37 Jan 3 11:57:02 psp6esxd04 ptp4l: [6023.076] selected best master clock 0080ea.fffe.8c2100 Jan 3 11:57:02 psp6esxd04 ptp4l: [6023.077] updating UTC offset to 37 Something is causing the BMC to trigger every four seconds. That seems wrong. Maybe you have a logAnnounceInterval mismatch? Also, what is the phc2sys command line? Thanks, Richard |
From: Dan G. <da...@po...> - 2019-01-03 21:30:54
|
----- On Jan 3, 2019, at 12:24 PM, Richard Cochran ric...@gm... wrote: > On Thu, Jan 03, 2019 at 04:58:35PM +0000, Dan Geist wrote: >> summary_interval 4 > > Leave this at zero for debugging, so you can see the synchronization messages. Done. Lots of verbose output now. > Looking at the ptp4l logs: > > Jan 3 11:56:50 psp6esxd04 ptp4l: [6011.077] port 1: LISTENING to UNCALIBRATED > on RS_SLAVE > Jan 3 11:56:52 psp6esxd04 ptp4l: [6012.144] selected best master clock > 0080ea.fffe.8c2100 > Jan 3 11:56:52 psp6esxd04 ptp4l: [6012.144] updating UTC offset to 37 > Jan 3 11:56:54 psp6esxd04 ptp4l: [6014.399] port 1: UNCALIBRATED to SLAVE on > MASTER_CLOCK_SELECTED > Jan 3 11:56:54 psp6esxd04 ptp4l: [6015.076] selected best master clock > 0080ea.fffe.8c2100 > Jan 3 11:56:54 psp6esxd04 ptp4l: [6015.077] updating UTC offset to 37 > Jan 3 11:56:58 psp6esxd04 ptp4l: [6019.076] selected best master clock > 0080ea.fffe.8c2100 > Jan 3 11:56:58 psp6esxd04 ptp4l: [6019.077] updating UTC offset to 37 > Jan 3 11:57:02 psp6esxd04 ptp4l: [6023.076] selected best master clock > 0080ea.fffe.8c2100 > Jan 3 11:57:02 psp6esxd04 ptp4l: [6023.077] updating UTC offset to 37 > > Something is causing the BMC to trigger every four seconds. That > seems wrong. Maybe you have a logAnnounceInterval mismatch? Perhaps... but I have it set to once a second, which matches my GM: PTP Domain Number : 44 Clock Class : 6 Master Clock Type : One Step Clock Class Profile : G.8275.2 Master Delay Mechanism : End To End Max Slaves Supported : 100 Max Static Slaves Supported : 0 Max Announce Message Rate : 1 Packet per 1 Second Max Sync Message Rate : 32 Packets per Second Max Delay Response Message Rate : 32 Packets per Second Max Lease Duration : 300 sec Announce Extension TLV : N/A The BMC messages do settle down after a while. I commented out one of the GMs and it seems to only iterate on BMC 2 or 3 times, now. > Also, what is the phc2sys command line? It's being run via systemd, but: # ps -Aef | grep phc2sys root 5041 1 0 16:27 ? 00:00:00 /usr/local/sbin/phc2sys -w -s em2.98 and for reference: # ethtool -T em2.98 Time stamping parameters for em2.98: 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: 1 Hardware Transmit Timestamp Modes: off (HWTSTAMP_TX_OFF) on (HWTSTAMP_TX_ON) Hardware Receive Filter Modes: none (HWTSTAMP_FILTER_NONE) ptpv1-l4-event (HWTSTAMP_FILTER_PTP_V1_L4_EVENT) ptpv2-l4-event (HWTSTAMP_FILTER_PTP_V2_L4_EVENT) ptpv2-l2-event (HWTSTAMP_FILTER_PTP_V2_L2_EVENT) Thanks Dan -- Dan Geist |