Thread: [Linuxptp-users] Using gPTP profile on multiple devices
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: André S. <and...@gm...> - 2018-07-30 14:46:32
|
I am currently trying to use ptp4l with a gPTP profile with 3 devices connected to a switch. Step 1) Used default ptp4l profile, all 3 devices worked and I was able to fiddle with master selection and priority levels without any problems. Step 2) Used gPTP profile, devices B and C worked as slaves and selected the switch as master. Device A uses its local clock as master and seems disconnected from device B and C. Step 3) Used gPTP profile with device A connected directly to B or C. It works without problems. Step 4) I switched back to using the default ptp4l profile with the -P (P2P) flag only. I am able to use any 2 devices together successfully but as soon as I turn on the third device it fails. Questions: 1) From step 2, why would A not use the switch as its master clock or react to the other 2 devices? 2) From step 4, does the failure mean that you cannot use P2P with more than 2 devices connected through a switch? 3) From step 4, I thought it could mean that the switch does not support P2P but why would it work with 2 devices then? 4) Could device A be the problem? Software and hardware details listed below as well as logs from Step 4 and the gPTP profile used. Any help would be appreciated. Please let me know if any other information is required. ### SOFRWARE ### OS: UBUNTU 18.04.1 LTS PTP4L: 1.92 ### HARDWARE ### Device A: NUC7i3BNH ethtool -T eno1: Time stamping parameters for eno1: 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: 0 Hardware Transmit Timestamp Modes: off (HWTSTAMP_TX_OFF) on (HWTSTAMP_TX_ON) Hardware Receive Filter Modes: none (HWTSTAMP_FILTER_NONE) all (HWTSTAMP_FILTER_ALL) ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC) ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC) ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ) ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC) ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ) ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT) ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC) ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ) Devices B & C: Identical Supermicro X10SDV-4C-TLN4F with Intel I210 network card Time stamping parameters for ens2: 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: 0 Hardware Transmit Timestamp Modes: off (HWTSTAMP_TX_OFF) on (HWTSTAMP_TX_ON) Hardware Receive Filter Modes: none (HWTSTAMP_FILTER_NONE) all (HWTSTAMP_FILTER_ALL) ### STEP 4 LOGS ### # STARTING DEVICE A # sudo ./ptp4l -i eno1 -m -P ptp4l[15537.834]: selected /dev/ptp0 as PTP clock ptp4l[15537.834]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[15537.834]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[15544.999]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_ EXPIRES ptp4l[15544.999]: selected local clock 94c691.fffe.1d75f9 as best master ptp4l[15544.999]: assuming the grand master role # STARTING DEVICE B # sudo ./ptp4l -i ens2 -m -P ptp4l[15077.735]: selected /dev/ptp0 as PTP clock ptp4l[15077.736]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[15077.736]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[15078.870]: port 1: new foreign master 94c691.fffe.1d75f9-1 ptp4l[15082.870]: selected best master clock 94c691.fffe.1d75f9 ptp4l[15082.870]: assuming the grand master role ptp4l[15082.870]: port 1: LISTENING to GRAND_MASTER on RS_GRAND_MASTER ### DEVICE A DETECTS NEW MASTER ### ptp4l[15595.007]: port 1: new foreign master 6805ca.fffe.4ab9c5-1 ptp4l[15599.007]: selected best master clock 6805ca.fffe.4ab9c5 ptp4l[15599.007]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[15600.007]: master offset 5135529 s0 freq -8491 path delay 38425 ptp4l[15601.007]: master offset 5139643 s1 freq -4377 path delay 38439 ptp4l[15602.007]: master offset -359 s2 freq -4736 path delay 38453 ptp4l[15602.007]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[15603.007]: master offset -217 s2 freq -4702 path delay 38453 ptp4l[15604.007]: master offset 8 s2 freq -4542 path delay 38453 ptp4l[15605.007]: master offset 155 s2 freq -4393 path delay 38453 ptp4l[15606.007]: master offset -312 s2 freq -4813 path delay 38462 # STARTING UP DEVICE C # sudo ./ptp4l -i ens2 -m -P ptp4l[15185.095]: selected /dev/ptp0 as PTP clock ptp4l[15185.096]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[15185.096]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[15185.570]: port 1: rogue peer delay response ptp4l[15185.570]: port 1: LISTENING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[15201.572]: port 1: FAULTY to LISTENING on INIT_COMPLETE # DEVICE A ERROR # ptp4l[15702.882]: port 1: multiple peer responses ptp4l[15702.882]: port 1: rogue peer delay response ptp4l[15702.882]: port 1: SLAVE to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) # DEVICE B ERROR # ptp4l[15190.747]: port 1: received pdelay_resp msg with unexpected peer port id 6805ca.fffe.5a75d6-1 ptp4l[15190.747]: port 1: multiple peer responses ptp4l[15190.747]: port 1: rogue peer delay response ptp4l[15190.747]: port 1: GRAND_MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[15206.748]: port 1: FAULTY to LISTENING on INIT_COMPLETE ### gPTP PROFILE ### [global] # # Default Data Set # twoStepFlag 1 gmCapable 1 priority1 248 priority2 248 domainNumber 0 clockClass 248 clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF free_running 0 freq_est_interval 1 # # Port Data Set # logAnnounceInterval 1 logSyncInterval -3 logMinPdelayReqInterval 0 announceReceiptTimeout 3 syncReceiptTimeout 3 delayAsymmetry 0 fault_reset_interval 4 neighborPropDelayThresh 800 min_neighbor_prop_delay -20000000 # # Run time options # assume_two_step 1 logging_level 6 path_trace_enabled 1 follow_up_info 1 hybrid_e2e 0 tx_timestamp_timeout 1 use_syslog 1 verbose 0 summary_interval 0 kernel_leap 1 check_fup_sync 0 # # Servo options # pi_proportional_const 0.0 pi_integral_const 0.0 pi_proportional_scale 0.0 pi_proportional_exponent -0.3 pi_proportional_norm_max 0.7 pi_integral_scale 0.0 pi_integral_exponent 0.4 pi_integral_norm_max 0.3 step_threshold 0.0 first_step_threshold 0.00002 max_frequency 900000000 clock_servo pi sanity_freq_limit 200000000 ntpshm_segment 0 # # Transport options # transportSpecific 0x1 ptp_dst_mac 01:80:C2:00:00:0E p2p_dst_mac 01:80:C2:00:00:0E uds_address /var/run/ptp4l # # Default interface options # network_transport L2 delay_mechanism P2P time_stamping hardware tsproc_mode filter delay_filter moving_median delay_filter_length 10 egressLatency 0 ingressLatency 0 boundary_clock_jbod 0 |
From: Richard C. <ric...@gm...> - 2018-07-31 03:11:39
|
On Mon, Jul 30, 2018 at 04:46:23PM +0200, André Sadie wrote: > I am currently trying to use ptp4l with a gPTP profile with 3 devices > connected to a switch. This won't work. You need to use a time aware bridge instead of a switch. Sorry, Richard |
From: André S. <and...@gm...> - 2018-07-31 06:53:16
|
Hey Richard, Do you mind elaborating a little more on that? The switch I am using is a time-aware AVB switch that should be able to perform P2P as far as I know. On Tue, Jul 31, 2018 at 5:11 AM, Richard Cochran <ric...@gm...> wrote: > On Mon, Jul 30, 2018 at 04:46:23PM +0200, André Sadie wrote: > > I am currently trying to use ptp4l with a gPTP profile with 3 devices > > connected to a switch. > > This won't work. You need to use a time aware bridge instead of a switch. > > Sorry, > Richard > |
From: Delio B. <dbr...@au...> - 2018-07-31 07:29:36
|
Hello André, > On 31 Jul 2018, at 08:53, André Sadie <and...@gm...> wrote: > > Hey Richard, > Do you mind elaborating a little more on that? The switch I am using is a time-aware AVB switch that should be able to perform P2P as far as I know. > > On Tue, Jul 31, 2018 at 5:11 AM, Richard Cochran <ric...@gm...> wrote: > On Mon, Jul 30, 2018 at 04:46:23PM +0200, André Sadie wrote: > > I am currently trying to use ptp4l with a gPTP profile with 3 devices > > connected to a switch. > > This won't work. You need to use a time aware bridge instead of a switch. I believe the "multiple peer responses” log lines suggest the switch is not operating as a “time-aware AVB switch”. Is the AVB function of the switch enabled globally and on all the ports the devices are connected to? HTH — Delio |
From: Richard C. <ric...@gm...> - 2018-07-31 15:19:27
|
On Tue, Jul 31, 2018 at 08:53:07AM +0200, André Sadie wrote: > Do you mind elaborating a little more on that? The switch I am using is a > time-aware AVB switch that should be able to perform P2P as far as I know. Ok, then, that is what I meant. According to gPTP, such a switch is called a "time aware bridge". It is clear from the logs that your switch is not isolating the ports as it should. See Delio's response. Thanks, Richard |
From: André S. <and...@gm...> - 2018-08-01 13:38:50
|
OK you were right about ports not being isolated. On Wireshark when a request was sent, it got broadcasted and then received responses from all devices. I suspected the NUC which has an I219V was causing problems so I replaced it with a third PC using an I210 and then everything worked fine and according to Wireshark the devices are isolated. Just to be sure I also replaced the switch with an Extreme x440-48t. The Extreme has gPTP enabled and works fine with the I210's but the NUC still causes problems. >From the Extreme you can see gPTP is enabled. port 25 and 27 is connected to the I210's and port 29 is connected to the NUC. X440-48t.4 # show network-clock gptp gPTP status : Enabled gPTP enabled ports : 1d 2d 3d 4d 5d 6d 7d 8d 9d 10d 11d 12d 13d 14d 15d 16d 17d 18d 19d 20d 21d 22d 23d 24d *25m 26d *27m 28d *29d 30d 31d 32d 33d 34d 35d 36d 37d 38d 39d 40d 41d 42d 43d 44d 45d 46d 47d 48d Flags: (*) Active, (!) Administratively disabled, (d) Disabled gPTP port role, (m) Master gPTP port role, (p) Passive gPTP port role, (s) Slave gPTP port role Al the devices are using clean installs of Ubuntu, exact same profiles and build of PTP4L so I am not sure whats up with the NUC. On Tue, Jul 31, 2018 at 5:19 PM, Richard Cochran <ric...@gm...> wrote: > On Tue, Jul 31, 2018 at 08:53:07AM +0200, André Sadie wrote: > > Do you mind elaborating a little more on that? The switch I am using is a > > time-aware AVB switch that should be able to perform P2P as far as I > know. > > Ok, then, that is what I meant. According to gPTP, such a switch is > called a "time aware bridge". It is clear from the logs that your > switch is not isolating the ports as it should. See Delio's response. > > Thanks, > Richard > > |
From: Richard C. <ric...@gm...> - 2018-08-01 14:02:49
|
On Wed, Aug 01, 2018 at 03:38:41PM +0200, André Sadie wrote: > Al the devices are using clean installs of Ubuntu, exact same profiles and > build of PTP4L so I am not sure whats up with the NUC. What is a NUC? Thanks, Richard |
From: André S. <and...@gm...> - 2018-08-01 14:06:48
|
One of the devices I am using is an Intel NUC7i3BNH mini pc. On Wed, Aug 1, 2018 at 4:02 PM, Richard Cochran <ric...@gm...> wrote: > On Wed, Aug 01, 2018 at 03:38:41PM +0200, André Sadie wrote: > > Al the devices are using clean installs of Ubuntu, exact same profiles > and > > build of PTP4L so I am not sure whats up with the NUC. > > What is a NUC? > > Thanks, > Richard > |