linuxptp-users Mailing List for linuxptp (Page 4)
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
You can subscribe to this list here.
2012 |
Jan
|
Feb
(10) |
Mar
(47) |
Apr
|
May
(26) |
Jun
(10) |
Jul
(4) |
Aug
(2) |
Sep
(2) |
Oct
(20) |
Nov
(14) |
Dec
(8) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2013 |
Jan
(6) |
Feb
(18) |
Mar
(27) |
Apr
(57) |
May
(32) |
Jun
(21) |
Jul
(79) |
Aug
(108) |
Sep
(13) |
Oct
(73) |
Nov
(51) |
Dec
(24) |
2014 |
Jan
(24) |
Feb
(41) |
Mar
(39) |
Apr
(5) |
May
(6) |
Jun
(2) |
Jul
(5) |
Aug
(15) |
Sep
(7) |
Oct
(6) |
Nov
|
Dec
(7) |
2015 |
Jan
(27) |
Feb
(18) |
Mar
(37) |
Apr
(8) |
May
(13) |
Jun
(44) |
Jul
(4) |
Aug
(50) |
Sep
(35) |
Oct
(6) |
Nov
(24) |
Dec
(19) |
2016 |
Jan
(30) |
Feb
(30) |
Mar
(23) |
Apr
(4) |
May
(12) |
Jun
(19) |
Jul
(26) |
Aug
(13) |
Sep
|
Oct
(23) |
Nov
(37) |
Dec
(15) |
2017 |
Jan
(33) |
Feb
(19) |
Mar
(20) |
Apr
(43) |
May
(39) |
Jun
(23) |
Jul
(20) |
Aug
(27) |
Sep
(10) |
Oct
(15) |
Nov
|
Dec
(24) |
2018 |
Jan
(3) |
Feb
(10) |
Mar
(34) |
Apr
(34) |
May
(28) |
Jun
(50) |
Jul
(27) |
Aug
(75) |
Sep
(21) |
Oct
(42) |
Nov
(25) |
Dec
(31) |
2019 |
Jan
(39) |
Feb
(28) |
Mar
(19) |
Apr
(7) |
May
(30) |
Jun
(22) |
Jul
(54) |
Aug
(36) |
Sep
(19) |
Oct
(33) |
Nov
(36) |
Dec
(32) |
2020 |
Jan
(29) |
Feb
(38) |
Mar
(29) |
Apr
(30) |
May
(39) |
Jun
(45) |
Jul
(31) |
Aug
(52) |
Sep
(40) |
Oct
(8) |
Nov
(48) |
Dec
(30) |
2021 |
Jan
(35) |
Feb
(32) |
Mar
(23) |
Apr
(55) |
May
(43) |
Jun
(63) |
Jul
(17) |
Aug
(24) |
Sep
(9) |
Oct
(31) |
Nov
(67) |
Dec
(55) |
2022 |
Jan
(31) |
Feb
(48) |
Mar
(76) |
Apr
(18) |
May
(13) |
Jun
(46) |
Jul
(75) |
Aug
(54) |
Sep
(59) |
Oct
(65) |
Nov
(44) |
Dec
(7) |
2023 |
Jan
(38) |
Feb
(32) |
Mar
(35) |
Apr
(23) |
May
(46) |
Jun
(53) |
Jul
(18) |
Aug
(10) |
Sep
(24) |
Oct
(15) |
Nov
(40) |
Dec
(6) |
From: James C. <jj...@jc...> - 2023-09-16 02:37:10
|
I have a u-blox M8T connected to an i210-T1 and am trying this config with ts2phc 4.0 [global] ts2phc.pulsewidth 100000000 ts2phc.tod_source nmea ts2phc.nmea_serialport /dev/ttyUSB0 ts2phc.nmea_baudrate 9600 leapfile /usr/share/zoneinfo/leap-seconds.list [enp1s0] ts2phc.extts_polarity both I have chrony controlling the system clock using a GPS-connected local NTP server and after the offsets have settled down I compare the PHC and system clock using: phc_ctl enp1s0 cmp I get results that are close to 36.9 seconds (e.g. -36899918303ns). If I remove the tod_source line (so it is using the generic source), I get results that are close to 37s (e.g. -36999949290ns), which is what I would expect. James |
From: Whelan, A. <aw...@sr...> - 2023-09-15 20:42:13
|
Hello, I am very new to ptplinux. I am exploring using it as a time sync solution for an embedded system of systems my company is working on. Think of the hardware configuration as a custom backplane with a mix of custom and Commercial Off-the-Shelf (COTS) Plug-In Card(s). Each has a NIC and they will be connected via ethernet. There will be no access to the outside internet. There will be a GPS micro transceiver that will communicate with the outside world. I know that PTP has hardware requirements. For this conversation assume the hardware has the correct time stamping support. This system is likely to be rebooted daily (multiple times). We are considering a local NTP server but are concerned with convergence time between the GPS transceiver and the NTP server. We have a requirement for convergence accuracy within 1 second within 30 seconds of being up. Question 1. Can we configure a ptplinux grandmaster to use our GPS Transceiver as its time source? (limited documentation I've found seems to indicate it's possible) Question 2. If yes, would the convergence time between GPS and grandmaster to be almost instantaneous? Question 3. Can someone point me to documentation that shows me how to configure a PTP grandmaster to talk to a GPS transceiver device? Any insights would be appreciated! -Andrew |
From: Nemo C. <nem...@gm...> - 2023-09-07 13:10:18
|
Please try using "phc_ctl <iface_name> cmp". Thanks, Nemo On Thursday, 7 September, 2023 at 05:48:19 am GMT-4, Florian Kauer <flo...@li...> wrote: Hi Mehmet, I am not aware of an API to specifically request the current offset directly from phc2sys, but what you can do is to manually request the time from CLOCK_TAI and the PHC and calculate the delta. Depends on your application if that is sufficient (or even what you actually want in the first place), because there is obviously the added latency between requesting the two clocks (and that latency can even get completely messed up by power saving like ASPM). See https://tsn.readthedocs.io/timesync.html for details and specifically https://tsn.readthedocs.io/_downloads/f329e8dec804247b1dbb5835bd949e6f/check_clocks.c for a tool that already includes several requests you might be looking for (including the one above). Greetings, Florian On 06.09.23 22:14, Mehmet Akbulut wrote: > Hello, > > ptp4l offers a management interface based on the standard but is there a similar API to query state of phc2sys? Specifically looking to grab offset value, hopefully without parsing the logs. > > Sincerely, > Mehmet Akbulut > > > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users _______________________________________________ Linuxptp-users mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linuxptp-users |
From: Florian K. <flo...@li...> - 2023-09-07 09:44:53
|
Hi Mehmet, I am not aware of an API to specifically request the current offset directly from phc2sys, but what you can do is to manually request the time from CLOCK_TAI and the PHC and calculate the delta. Depends on your application if that is sufficient (or even what you actually want in the first place), because there is obviously the added latency between requesting the two clocks (and that latency can even get completely messed up by power saving like ASPM). See https://tsn.readthedocs.io/timesync.html for details and specifically https://tsn.readthedocs.io/_downloads/f329e8dec804247b1dbb5835bd949e6f/check_clocks.c for a tool that already includes several requests you might be looking for (including the one above). Greetings, Florian On 06.09.23 22:14, Mehmet Akbulut wrote: > Hello, > > ptp4l offers a management interface based on the standard but is there a similar API to query state of phc2sys? Specifically looking to grab offset value, hopefully without parsing the logs. > > Sincerely, > Mehmet Akbulut > > > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users |
From: Mehmet A. <meh...@mo...> - 2023-09-06 20:32:55
|
Hello, ptp4l offers a management interface based on the standard but is there a similar API to query state of phc2sys? Specifically looking to grab offset value, hopefully without parsing the logs. Sincerely, Mehmet Akbulut |
From: Emeric V. <em...@mb...> - 2023-09-06 09:40:21
|
I solved my issue by putting the client ethernet port in promiscuous mode. (command: ip link set promisc on dev eth0) On 29/08/2023 16:48, Emeric Verschuur wrote: > > Hello, > > > I'm trying to set up time synchronization between two hosts using > software time stamping. > > My configuration works fine with two VMs and two physical devices, but > not in another specific case : > > The client receives PTP packets but won't detect the master and loop > on "selected local clock ... as best master" (see logs below) > > > Any idea? Any way to display the reason for this issue? > > > Thanks, > > Emeric > > > Technical information: > > linuxptp version 3.1.1-3 (ubuntu 22.04 package) > > > Configuration (only specific parts) > > Master: > [global] > slaveOnly 0 > network_transport UDPv4 > delay_mechanism P2P > time_stamping software > [eno2] > > Client: > [global] > step_threshold 0.0005 > network_transport UDPv4 > delay_mechanism P2P > time_stamping software > [eth0] > > Ethernet info (client side): > > ethtool --driver eth0 > driver: cpsw > version: 1.0 > firmware-version: > expansion-rom-version: > bus-info: 48484000.ethernet > supports-statistics: yes > supports-test: no > supports-eeprom-access: no > supports-register-dump: yes > supports-priv-flags: no > > Logs on the client side > > ptp4l -f /etc/linuxptp/pfx-ptp4l.conf -m -l 7 > ptp4l[10362.406]: config item (null).assume_two_step is 0 > ptp4l[10362.407]: config item (null).check_fup_sync is 0 > ptp4l[10362.407]: config item (null).tx_timestamp_timeout is 10000 > ptp4l[10362.408]: config item (null).hwts_filter is 0 > ptp4l[10362.408]: config item (null).clock_servo is 0 > ptp4l[10362.409]: config item (null).clock_type is 32768 > ptp4l[10362.409]: config item (null).clock_servo is 0 > ptp4l[10362.409]: config item (null).clockClass is 248 > ptp4l[10362.410]: config item (null).clockAccuracy is 254 > ptp4l[10362.410]: config item (null).offsetScaledLogVariance is 65535 > ptp4l[10362.410]: config item (null).productDescription is ';;' > ptp4l[10362.411]: config item (null).revisionData is ';;' > ptp4l[10362.411]: config item (null).userDescription is ';' > ptp4l[10362.412]: config item (null).manufacturerIdentity is '00:00:00' > ptp4l[10362.412]: config item (null).domainNumber is 0 > ptp4l[10362.412]: config item (null).slaveOnly is 1 > ptp4l[10362.413]: config item (null).gmCapable is 1 > ptp4l[10362.413]: config item (null).gmCapable is 1 > ptp4l[10362.413]: config item (null).G.8275.defaultDS.localPriority is > 128 > ptp4l[10362.414]: config item (null).maxStepsRemoved is 255 > ptp4l[10362.414]: config item (null).time_stamping is 0 > ptp4l[10362.415]: config item (null).twoStepFlag is 1 > ptp4l[10362.415]: config item (null).twoStepFlag is 1 > ptp4l[10362.415]: config item (null).time_stamping is 0 > ptp4l[10362.416]: config item (null).priority1 is 128 > ptp4l[10362.416]: config item (null).priority2 is 128 > ptp4l[10362.417]: interface index 2 is up > ptp4l[10362.417]: config item (null).free_running is 0 > ptp4l[10362.417]: config item (null).clockIdentity is > '000000.0000.000000' > ptp4l[10362.418]: config item (null).uds_address is '/var/run/ptp4l' > ptp4l[10362.418]: section item /var/run/ptp4l.announceReceiptTimeout > now 0 > ptp4l[10362.418]: section item /var/run/ptp4l.delay_mechanism now 0 > ptp4l[10362.419]: section item /var/run/ptp4l.network_transport now 0 > ptp4l[10362.419]: section item /var/run/ptp4l.delay_filter_length now 1 > ptp4l[10362.419]: config item (null).free_running is 0 > ptp4l[10362.420]: config item (null).freq_est_interval is 1 > ptp4l[10362.420]: config item (null).write_phase_mode is 0 > ptp4l[10362.421]: config item (null).gmCapable is 1 > ptp4l[10362.421]: config item (null).kernel_leap is 1 > ptp4l[10362.421]: config item (null).utc_offset is 37 > ptp4l[10362.422]: config item (null).timeSource is 160 > ptp4l[10362.422]: config item (null).pi_proportional_const is 0.000000 > ptp4l[10362.423]: config item (null).pi_integral_const is 0.000000 > ptp4l[10362.423]: config item (null).pi_proportional_scale is 0.000000 > ptp4l[10362.423]: config item (null).pi_proportional_exponent is > -0.300000 > ptp4l[10362.423]: config item (null).pi_proportional_norm_max is 0.700000 > ptp4l[10362.423]: config item (null).pi_integral_scale is 0.000000 > ptp4l[10362.424]: config item (null).pi_integral_exponent is 0.400000 > ptp4l[10362.424]: config item (null).pi_integral_norm_max is 0.300000 > ptp4l[10362.424]: config item (null).step_threshold is 0.000500 > ptp4l[10362.424]: config item (null).first_step_threshold is 0.000020 > ptp4l[10362.424]: config item (null).max_frequency is 900000000 > ptp4l[10362.425]: config item (null).servo_offset_threshold is 0 > ptp4l[10362.425]: config item (null).servo_num_offset_values is 10 > ptp4l[10362.425]: config item (null).dataset_comparison is 0 > ptp4l[10362.425]: config item (null).tsproc_mode is 0 > ptp4l[10362.425]: config item (null).delay_filter is 1 > ptp4l[10362.426]: config item (null).delay_filter_length is 10 > ptp4l[10362.426]: config item (null).initial_delay is 0 > ptp4l[10362.426]: config item (null).summary_interval is 0 > ptp4l[10362.426]: config item (null).sanity_freq_limit is 0 > ptp4l[10362.426]: PI servo: sync interval 1.000 kp 0.100 ki 0.001000 > ptp4l[10362.427]: config item /var/run/ptp4l.boundary_clock_jbod is 0 > ptp4l[10362.427]: config item /var/run/ptp4l.network_transport is 0 > ptp4l[10362.427]: config item /var/run/ptp4l.masterOnly is 0 > ptp4l[10362.427]: config item /var/run/ptp4l.BMCA is 0 > ptp4l[10362.427]: config item /var/run/ptp4l.delayAsymmetry is 0 > ptp4l[10362.427]: config item /var/run/ptp4l.follow_up_info is 0 > ptp4l[10362.428]: config item /var/run/ptp4l.freq_est_interval is 1 > ptp4l[10362.428]: config item /var/run/ptp4l.msg_interval_request is 0 > ptp4l[10362.428]: config item /var/run/ptp4l.net_sync_monitor is 0 > ptp4l[10362.428]: config item /var/run/ptp4l.path_trace_enabled is 0 > ptp4l[10362.428]: config item /var/run/ptp4l.tc_spanning_tree is 0 > ptp4l[10362.428]: config item /var/run/ptp4l.ingressLatency is 0 > ptp4l[10362.429]: config item /var/run/ptp4l.egressLatency is 0 > ptp4l[10362.429]: config item /var/run/ptp4l.delay_mechanism is 0 > ptp4l[10362.429]: config item /var/run/ptp4l.hybrid_e2e is 0 > ptp4l[10362.429]: config item /var/run/ptp4l.fault_badpeernet_interval > is 16 > ptp4l[10362.429]: config item /var/run/ptp4l.fault_reset_interval is 4 > ptp4l[10362.429]: config item /var/run/ptp4l.tsproc_mode is 0 > ptp4l[10362.430]: config item /var/run/ptp4l.delay_filter is 1 > ptp4l[10362.430]: config item /var/run/ptp4l.delay_filter_length is 1 > ptp4l[10362.430]: config item (null).slave_event_monitor is '' > ptp4l[10362.430]: config item eth0.boundary_clock_jbod is 0 > ptp4l[10362.430]: config item eth0.network_transport is 1 > ptp4l[10362.430]: config item eth0.masterOnly is 0 > ptp4l[10362.431]: config item eth0.BMCA is 0 > ptp4l[10362.431]: config item eth0.delayAsymmetry is 0 > ptp4l[10362.431]: config item eth0.follow_up_info is 0 > ptp4l[10362.431]: config item eth0.freq_est_interval is 1 > ptp4l[10362.431]: config item eth0.msg_interval_request is 0 > ptp4l[10362.431]: config item eth0.net_sync_monitor is 0 > ptp4l[10362.432]: config item eth0.path_trace_enabled is 0 > ptp4l[10362.432]: config item eth0.tc_spanning_tree is 0 > ptp4l[10362.432]: config item eth0.ingressLatency is 0 > ptp4l[10362.432]: config item eth0.egressLatency is 0 > ptp4l[10362.432]: config item eth0.delay_mechanism is 2 > ptp4l[10362.432]: config item eth0.unicast_master_table is 0 > ptp4l[10362.433]: config item eth0.unicast_listen is 0 > ptp4l[10362.433]: config item eth0.hybrid_e2e is 0 > ptp4l[10362.433]: config item eth0.fault_badpeernet_interval is 16 > ptp4l[10362.433]: config item eth0.fault_reset_interval is 4 > ptp4l[10362.433]: config item eth0.tsproc_mode is 0 > ptp4l[10362.433]: config item eth0.delay_filter is 1 > ptp4l[10362.434]: config item eth0.delay_filter_length is 10 > ptp4l[10362.434]: config item eth0.logMinDelayReqInterval is 0 > ptp4l[10362.434]: config item eth0.logAnnounceInterval is 1 > ptp4l[10362.434]: config item eth0.inhibit_announce is 0 > ptp4l[10362.434]: config item eth0.ignore_source_id is 0 > ptp4l[10362.434]: config item eth0.announceReceiptTimeout is 3 > ptp4l[10362.435]: config item eth0.syncReceiptTimeout is 0 > ptp4l[10362.435]: config item eth0.transportSpecific is 0 > ptp4l[10362.435]: config item eth0.ignore_transport_specific is 0 > ptp4l[10362.435]: config item eth0.G.8275.portDS.localPriority is 128 > ptp4l[10362.435]: config item eth0.logSyncInterval is 0 > ptp4l[10362.436]: config item eth0.operLogSyncInterval is 0 > ptp4l[10362.436]: config item eth0.logMinPdelayReqInterval is 0 > ptp4l[10362.436]: config item eth0.operLogPdelayReqInterval is 0 > ptp4l[10362.436]: config item eth0.neighborPropDelayThresh is 20000000 > ptp4l[10362.436]: config item eth0.min_neighbor_prop_delay is -20000000 > ptp4l[10362.436]: config item eth0.asCapable is 1 > ptp4l[10362.437]: config item eth0.inhibit_delay_req is 0 > ptp4l[10362.437]: config item eth0.udp_ttl is 1 > ptp4l[10362.453]: config item (null).dscp_event is 0 > ptp4l[10362.453]: config item (null).dscp_general is 0 > ptp4l[10362.453]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE > ptp4l[10362.453]: config item /var/run/ptp4l.logMinDelayReqInterval is 0 > ptp4l[10362.454]: config item /var/run/ptp4l.logAnnounceInterval is 1 > ptp4l[10362.454]: config item /var/run/ptp4l.inhibit_announce is 0 > ptp4l[10362.454]: config item /var/run/ptp4l.ignore_source_id is 0 > ptp4l[10362.454]: config item /var/run/ptp4l.announceReceiptTimeout is 0 > ptp4l[10362.454]: config item /var/run/ptp4l.syncReceiptTimeout is 0 > ptp4l[10362.454]: config item /var/run/ptp4l.transportSpecific is 0 > ptp4l[10362.454]: config item /var/run/ptp4l.ignore_transport_specific > is 0 > ptp4l[10362.455]: config item > /var/run/ptp4l.G.8275.portDS.localPriority is 128 > ptp4l[10362.455]: config item /var/run/ptp4l.logSyncInterval is 0 > ptp4l[10362.455]: config item /var/run/ptp4l.operLogSyncInterval is 0 > ptp4l[10362.455]: config item /var/run/ptp4l.logMinPdelayReqInterval is 0 > ptp4l[10362.455]: config item /var/run/ptp4l.operLogPdelayReqInterval > is 0 > ptp4l[10362.455]: config item /var/run/ptp4l.neighborPropDelayThresh > is 20000000 > ptp4l[10362.455]: config item /var/run/ptp4l.min_neighbor_prop_delay > is -20000000 > ptp4l[10362.455]: config item /var/run/ptp4l.asCapable is 1 > ptp4l[10362.456]: config item /var/run/ptp4l.inhibit_delay_req is 0 > ptp4l[10362.456]: config item (null).uds_address is '/var/run/ptp4l' > ptp4l[10362.456]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE > ptp4l[10362.456]: port 1: received link status notification > ptp4l[10362.456]: interface index 2 is up > ptp4l[10363.453]: port 1: delay timeout > ptp4l[10364.454]: port 1: delay timeout > ptp4l[10364.454]: port 1: setting asCapable > ptp4l[10365.454]: port 1: delay timeout > ptp4l[10366.454]: port 1: delay timeout > ptp4l[10367.454]: port 1: delay timeout > ptp4l[10368.454]: port 1: delay timeout > ptp4l[10368.897]: port 1: announce timeout > ptp4l[10368.897]: selected local clock 0001c0.fffe.1f4c9b as best master > ptp4l[10369.454]: port 1: delay timeout > ptp4l[10370.454]: port 1: delay timeout > ptp4l[10371.454]: port 1: delay timeout > ptp4l[10372.454]: port 1: delay timeout > ptp4l[10373.455]: port 1: delay timeout > ptp4l[10374.455]: port 1: delay timeout > ptp4l[10375.455]: port 1: delay timeout > ptp4l[10375.488]: port 1: announce timeout > ptp4l[10375.488]: selected local clock 0001c0.fffe.1f4c9b as best master > [...] > > > On the client I receive Announce, Peer_Delay_Req, Sync, Follow_Up > messages PTP packets (tcpdump -i eth0 udp): > > [...] > 16:51:38.914947 IP 192.168.0.10.ptp-general > > ptp-primary.mcast.net.ptp-general: PTPv2, v1 compat : no, msg type : > announce msg, length : 64, domain : 0, reserved1 : 0, Flags [none], NS > correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : > 0x3ceceffffe0384c9, port id : 1, seq id : 4, control : 5 (Other), log > message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, > origin cur utc :37, rsvd : 0, gm priority_1 : 128, gm clock class : > 248, gm clock accuracy : 254, gm clock variance : 65535, gm priority_2 > : 128, gm clock id : 0x3ceceffffe0384c9, steps removed : 0, time > source : 0xa0 > 16:51:39.197767 IP 192.168.0.10.ptp-event > 224.0.0.107.ptp-event: > PTPv2, v1 compat : no, msg type : peer delay req msg, length : 54, > domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS > correction : 0, reserved2 : 0, clock identity : 0x3ceceffffe0384c9, > port id : 1, seq id : 15, control : 5 (Other), log message interval : > 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity > : 0x0, port id : 0 > 16:51:39.914281 IP 192.168.0.10.ptp-event > > ptp-primary.mcast.net.ptp-event: PTPv2, v1 compat : no, msg type : > sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS > correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : > 0x3ceceffffe0384c9, port id : 1, seq id : 8, control : 0 (sync msg), > log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds > 16:51:39.914292 IP 192.168.0.10.ptp-general > > ptp-primary.mcast.net.ptp-general: PTPv2, v1 compat : no, msg type : > follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], > NS correction : 0, sub NS correction : 0, reserved2 : 0, clock > identity : 0x3ceceffffe0384c9, port id : 1, seq id : 8, control : 2 > (peer delay req msg), log message interval : 0, preciseOriginTimeStamp > : 1693318221 seconds, 580595169 nanoseconds > [...] > |
From: Trey H. <har...@gm...> - 2023-09-05 00:45:33
|
I was doing some testing on my network of 50 devices and wanted to see how the network responded to a flood of broadcast packets (need my solution to be robust to things like this - floods are not likely but high bandwidth usage is). Jitter / lack of good sync was an expected result, but after I stopped the flood test I noticed some of the slave ptp4l processes were no longer syncing at all. I looked back through the logs and saw this: port 1 (eno1): server unilaterally canceled unicast ANNOUNCE grant port 1 (eno1): server unilaterally canceled unicast ANNOUNCE grant port 1 (eno1): server unilaterally canceled unicast DELAY_RESP grant port 1 (eno1): server unilaterally canceled unicast DELAY_RESP grant port 1 (eno1): server unilaterally canceled unicast SYNC grant port 1 (eno1): server unilaterally canceled unicast SYNC grant After this, no further syncing was done and the ptp4l client just sat idle. Is there anything I can do to make sure these clients re-attempt to establish sync with the unicast master? I can of course monitor the output for messages like this and restart the process.. but I'm hoping maybe there's a configuration option? or perhaps a place in the code I can patch to get the behavior I'm wanting? Thanks, Trey |
From: Richard C. <ric...@gm...> - 2023-09-04 23:36:35
|
On Tue, Sep 05, 2023 at 04:45:14AM +0530, Karthick Gunasekaran via Linuxptp-users wrote: > Kindly let me know, if this waiting for 3 announce packets to send first > delay request can be modified (or) this is as per standard and cannot be > modified. This is specified in IEEE 1588. Thanks, Richard |
From: Karthick G. <kar...@ar...> - 2023-09-04 23:15:38
|
Hi PTP experts, I have the following topology: PTP-source-1 ————— Boundary-clock ———— PTP-source-2 - Initially PTP-source-1 is acting as Grandmaster to both Boundary clock and PTP-source-2 due to higher priority1 - When I disable PTP-source-1 I see that PTP-source-2 becomes grandmaster(due to second higher priority1) and sends out announce, sync packet once announce timeout expires. - Boundary clock is waiting for 3 announce packets before sending out its first delay request packet Kindly let me know, if this waiting for 3 announce packets to send first delay request can be modified (or) this is as per standard and cannot be modified. Regards, Karthick |
From: Janusz U. <j.u...@el...> - 2023-09-01 16:08:30
|
Hi, Any news about the topic? I got only "Your message to the list 'linuxptp-users' has been forwarded to the moderator(s)" as feedback. best regards, Janusz W dniu 20.06.2023 o 16:50, Janusz Użycki pisze: > Hi. > > > In Linux kernel HWTSTAMP_TX_ONESTEP_P2P is introduced as feature > superset of HWTSTAMP_TX_ONESTEP_SYNC for peer delay. However only few > device drivers and its hardware support full P2P one-step timestamping. > > It is not clear if one-step SYNC and two-step Pdelay method in P2P can > be mixed together (by single OC/BC master) when > HWTSTAMP_TX_ONESTEP_SYNC is supported only: > > - According to IEEE1588-2008 specification (11.4.3) peer delay > responder one-step clock "SHALL" (key word) update Pdelay_resp on the > fly so it seems they can't be mixed. > > - Moreover "one-step clock" term suggests it is clock property, not > port timestamping ability. On the other hand it seems artifical > requirement. > > 1. Can you clarify for one-step P2P what is met in the field (eg. PTP > Plugfest) ? > > 2. And what is formal IEEE1588 requirement/statement ? > > 3. Is such P2P mix supported/handled properly by TC and OC/BC slaves? > It looks supported (both OC slave and master) by linuxptp 4.0 and 3.1 > (port.c::process_pdelay_req()). > > 4. The latest gPTP and power profile have recommendation for one-step. > Do they allow/mean one-step SYNC only or full P2P with Pdelay ? > > > best regards > Janusz > > > > > > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users |
From: Trey H. <har...@gm...> - 2023-08-31 21:01:24
|
Hello, I am having problems on a network with about 50 devices which I am attempting to synchronize via ptp4l and phc2sys. 1 device serves as the master clock, all the others slave to that clock. On the master clock machine, ptp4l often prints the following: port 1 (eno1): received DELAY_REQ without timestamp I assume this is because one of the device's NIC's fails to timestamp the packet? Sometimes these messages come intermittently, sometimes it seems like a ton all show up at once. Any tips for getting to the bottom of this and figuring out why this is happening? The machines are all plugged into the same switch, there isn't anything weird about the network hardware as far as I know. The machines are all identical, they are 11th gen Intel NUC boards. Here's some detailed info: $ sudo lshw -class network *-network description: Ethernet interface product: Ethernet Connection (13) I219-LM vendor: Intel Corporation physical id: 1f.6 bus info: pci@0000:00:1f.6 logical name: eno1 version: 20 serial: 24:1c:04:1c:ae:5b size: 1Gbit/s capacity: 1Gbit/s width: 32 bits clock: 33MHz capabilities: pm msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=5.19.0-32-generic duplex=full firmware=0.8-4 ip=172.16.41.121 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:126 memory:50500000-5051ffff Thanks! Trey |
From: Keller, J. E <jac...@in...> - 2023-08-30 17:07:20
|
You can specify both interfaces using the [<ifname>] syntax. I believe all configuration options can be supported in each per-interface domain so you can set the configuration options you want for each interface separately, rather than putting them in [global]? Thanks, Jake From: John Koch via Linuxptp-users <lin...@li...> Sent: Tuesday, August 29, 2023 10:30 PM To: Richard Cochran <ric...@gm...> Cc: lin...@li... Subject: Re: [Linuxptp-users] Multiple interfaces with different PTP implementations I have continued to experiment with this and have been unable to figure out how to implement an 802.1AS automotive master and 1588 slave in a single configuration file. Any additional guidance would be appreciated. On Mon, Aug 14, 2023 at 2:27 PM John Koch <jk...@ou...<mailto:jk...@ou...>> wrote: I apologize for my ignorance but I'm not sure how to implement that all in a single configuration file. I currently have two very generic configuration files. The first is used on the primary interface as the 1588 slave: [global] slaveOnly 1 time_stamping hardware step_threshold 1.0 delay_mechanism Auto network_transport UDPv4 [enp11s0] The second configuration file is the default automotive-master.cfg profile: https://github.com/richardcochran/linuxptp/blob/master/configs/automotive-master.cfg I run the primary configuration file like this: ptp4l -f <path_to_file> For the other interfaces I run: ptp4l -f /etc/automotive-master.cfg -i <interface_name> I can add --boundary_clock_jbod to my automotive-master.cfg file and add the automotive interfaces and a boundary clock is properly formed between them. However, I don't know how to create a configuration file of dissimilar PTP instances on different interfaces. I will keep investigating and experimenting while I await a reply. On Fri, Aug 11, 2023 at 9:24 PM Richard Cochran <ric...@gm...<mailto:ric...@gm...>> wrote: On Fri, Aug 11, 2023 at 12:32:24PM -0600, John Koch via Linuxptp-users wrote: > I was wondering what the best way to configure ptp4l and phc2sys in the > following configuration would be. > > There is a 1588 IPv4 PTP master present on the network. My computer has > several NICs which have PTP hardware support, one of them is plugged into > the network with the 1588 IPv4 master. I also have multiple devices which > are 802.1AS automotive slaves that I want to synchronize with the rest of > the devices on the 1588 network. Currently I have connected each of the > 802.1AS automotive slaves to an individual NIC on my computer and run an > instance of ptp4l and phc2sys for each slave. > > Is there a better way of doing this? If so could someone provide some > guidance? You can run: - one ptp4l instance as a Boundary Clock with 1588 on the slave port and gPTP on the master ports (using a configuration file) - one phc2sys in "automatic" (-a) mode with --boundary_clock_jbod That will make the gPTP clients synchronize to the 1588 IPv4 master. HTH, Richard |
From: John K. <jk...@ou...> - 2023-08-30 06:00:47
|
I have continued to experiment with this and have been unable to figure out how to implement an 802.1AS automotive master and 1588 slave in a single configuration file. Any additional guidance would be appreciated. On Mon, Aug 14, 2023 at 2:27 PM John Koch <jk...@ou...> wrote: > I apologize for my ignorance but I'm not sure how to implement that all in > a single configuration file. I currently have two very generic > configuration files. The first is used on the primary interface as the 1588 > slave: > > *[global]* > > *slaveOnly 1* > > *time_stamping hardware* > > *step_threshold 1.0* > > *delay_mechanism Auto* > > *network_transport UDPv4* > > > *[enp11s0]* > > The second configuration file is the default automotive-master.cfg > profile: > https://github.com/richardcochran/linuxptp/blob/master/configs/automotive-master.cfg > > I run the primary configuration file like this: ptp4l -f <path_to_file> > For the other interfaces I run: *ptp4l -f /etc/automotive-master.cfg -i > <interface_name>* > I can add --boundary_clock_jbod to my automotive-master.cfg file and add > the automotive interfaces and a boundary clock is properly formed between > them. However, I don't know how to create a configuration file of > dissimilar PTP instances on different interfaces. I will keep investigating > and experimenting while I await a reply. > > On Fri, Aug 11, 2023 at 9:24 PM Richard Cochran <ric...@gm...> > wrote: > >> On Fri, Aug 11, 2023 at 12:32:24PM -0600, John Koch via Linuxptp-users >> wrote: >> > I was wondering what the best way to configure ptp4l and phc2sys in the >> > following configuration would be. >> > >> > There is a 1588 IPv4 PTP master present on the network. My computer has >> > several NICs which have PTP hardware support, one of them is plugged >> into >> > the network with the 1588 IPv4 master. I also have multiple devices >> which >> > are 802.1AS automotive slaves that I want to synchronize with the rest >> of >> > the devices on the 1588 network. Currently I have connected each of the >> > 802.1AS automotive slaves to an individual NIC on my computer and run an >> > instance of ptp4l and phc2sys for each slave. >> > >> > Is there a better way of doing this? If so could someone provide some >> > guidance? >> >> You can run: >> >> - one ptp4l instance as a Boundary Clock with 1588 on the slave port >> and gPTP on the master ports (using a configuration file) >> >> - one phc2sys in "automatic" (-a) mode with --boundary_clock_jbod >> >> That will make the gPTP clients synchronize to the 1588 IPv4 master. >> >> HTH, >> Richard >> >> |
From: saikrishna g. <say...@gm...> - 2023-08-30 05:41:08
|
Hi, We have a PCIe endpoint which supports PTM, PTP. One of the use case is to connect the PCIe EP card to x86 host and sync the system time to EP over PTM. But the PHC on EP is not exposed to x86 host. Somehow we want to get x86 system time through PCIe PTM and send to PCIe EP for ethernet packet ingress/egress processing. Any standard linux framework to utilize the PTM system time to sync to PHC/PTP on PCIe endpoint? Thanks, Sai |
From: Emeric V. <em...@mb...> - 2023-08-29 15:07:40
|
Hello, I'm trying to set up time synchronization between two hosts using software time stamping. My configuration works fine with two VMs and two physical devices, but not in another specific case : The client receives PTP packets but won't detect the master and loop on "selected local clock ... as best master" (see logs below) Any idea? Any way to display the reason for this issue? Thanks, Emeric Technical information: linuxptp version 3.1.1-3 (ubuntu 22.04 package) Configuration (only specific parts) Master: [global] slaveOnly 0 network_transport UDPv4 delay_mechanism P2P time_stamping software [eno2] Client: [global] step_threshold 0.0005 network_transport UDPv4 delay_mechanism P2P time_stamping software [eth0] Ethernet info (client side): ethtool --driver eth0 driver: cpsw version: 1.0 firmware-version: expansion-rom-version: bus-info: 48484000.ethernet supports-statistics: yes supports-test: no supports-eeprom-access: no supports-register-dump: yes supports-priv-flags: no Logs on the client side ptp4l -f /etc/linuxptp/pfx-ptp4l.conf -m -l 7 ptp4l[10362.406]: config item (null).assume_two_step is 0 ptp4l[10362.407]: config item (null).check_fup_sync is 0 ptp4l[10362.407]: config item (null).tx_timestamp_timeout is 10000 ptp4l[10362.408]: config item (null).hwts_filter is 0 ptp4l[10362.408]: config item (null).clock_servo is 0 ptp4l[10362.409]: config item (null).clock_type is 32768 ptp4l[10362.409]: config item (null).clock_servo is 0 ptp4l[10362.409]: config item (null).clockClass is 248 ptp4l[10362.410]: config item (null).clockAccuracy is 254 ptp4l[10362.410]: config item (null).offsetScaledLogVariance is 65535 ptp4l[10362.410]: config item (null).productDescription is ';;' ptp4l[10362.411]: config item (null).revisionData is ';;' ptp4l[10362.411]: config item (null).userDescription is ';' ptp4l[10362.412]: config item (null).manufacturerIdentity is '00:00:00' ptp4l[10362.412]: config item (null).domainNumber is 0 ptp4l[10362.412]: config item (null).slaveOnly is 1 ptp4l[10362.413]: config item (null).gmCapable is 1 ptp4l[10362.413]: config item (null).gmCapable is 1 ptp4l[10362.413]: config item (null).G.8275.defaultDS.localPriority is 128 ptp4l[10362.414]: config item (null).maxStepsRemoved is 255 ptp4l[10362.414]: config item (null).time_stamping is 0 ptp4l[10362.415]: config item (null).twoStepFlag is 1 ptp4l[10362.415]: config item (null).twoStepFlag is 1 ptp4l[10362.415]: config item (null).time_stamping is 0 ptp4l[10362.416]: config item (null).priority1 is 128 ptp4l[10362.416]: config item (null).priority2 is 128 ptp4l[10362.417]: interface index 2 is up ptp4l[10362.417]: config item (null).free_running is 0 ptp4l[10362.417]: config item (null).clockIdentity is '000000.0000.000000' ptp4l[10362.418]: config item (null).uds_address is '/var/run/ptp4l' ptp4l[10362.418]: section item /var/run/ptp4l.announceReceiptTimeout now 0 ptp4l[10362.418]: section item /var/run/ptp4l.delay_mechanism now 0 ptp4l[10362.419]: section item /var/run/ptp4l.network_transport now 0 ptp4l[10362.419]: section item /var/run/ptp4l.delay_filter_length now 1 ptp4l[10362.419]: config item (null).free_running is 0 ptp4l[10362.420]: config item (null).freq_est_interval is 1 ptp4l[10362.420]: config item (null).write_phase_mode is 0 ptp4l[10362.421]: config item (null).gmCapable is 1 ptp4l[10362.421]: config item (null).kernel_leap is 1 ptp4l[10362.421]: config item (null).utc_offset is 37 ptp4l[10362.422]: config item (null).timeSource is 160 ptp4l[10362.422]: config item (null).pi_proportional_const is 0.000000 ptp4l[10362.423]: config item (null).pi_integral_const is 0.000000 ptp4l[10362.423]: config item (null).pi_proportional_scale is 0.000000 ptp4l[10362.423]: config item (null).pi_proportional_exponent is -0.300000 ptp4l[10362.423]: config item (null).pi_proportional_norm_max is 0.700000 ptp4l[10362.423]: config item (null).pi_integral_scale is 0.000000 ptp4l[10362.424]: config item (null).pi_integral_exponent is 0.400000 ptp4l[10362.424]: config item (null).pi_integral_norm_max is 0.300000 ptp4l[10362.424]: config item (null).step_threshold is 0.000500 ptp4l[10362.424]: config item (null).first_step_threshold is 0.000020 ptp4l[10362.424]: config item (null).max_frequency is 900000000 ptp4l[10362.425]: config item (null).servo_offset_threshold is 0 ptp4l[10362.425]: config item (null).servo_num_offset_values is 10 ptp4l[10362.425]: config item (null).dataset_comparison is 0 ptp4l[10362.425]: config item (null).tsproc_mode is 0 ptp4l[10362.425]: config item (null).delay_filter is 1 ptp4l[10362.426]: config item (null).delay_filter_length is 10 ptp4l[10362.426]: config item (null).initial_delay is 0 ptp4l[10362.426]: config item (null).summary_interval is 0 ptp4l[10362.426]: config item (null).sanity_freq_limit is 0 ptp4l[10362.426]: PI servo: sync interval 1.000 kp 0.100 ki 0.001000 ptp4l[10362.427]: config item /var/run/ptp4l.boundary_clock_jbod is 0 ptp4l[10362.427]: config item /var/run/ptp4l.network_transport is 0 ptp4l[10362.427]: config item /var/run/ptp4l.masterOnly is 0 ptp4l[10362.427]: config item /var/run/ptp4l.BMCA is 0 ptp4l[10362.427]: config item /var/run/ptp4l.delayAsymmetry is 0 ptp4l[10362.427]: config item /var/run/ptp4l.follow_up_info is 0 ptp4l[10362.428]: config item /var/run/ptp4l.freq_est_interval is 1 ptp4l[10362.428]: config item /var/run/ptp4l.msg_interval_request is 0 ptp4l[10362.428]: config item /var/run/ptp4l.net_sync_monitor is 0 ptp4l[10362.428]: config item /var/run/ptp4l.path_trace_enabled is 0 ptp4l[10362.428]: config item /var/run/ptp4l.tc_spanning_tree is 0 ptp4l[10362.428]: config item /var/run/ptp4l.ingressLatency is 0 ptp4l[10362.429]: config item /var/run/ptp4l.egressLatency is 0 ptp4l[10362.429]: config item /var/run/ptp4l.delay_mechanism is 0 ptp4l[10362.429]: config item /var/run/ptp4l.hybrid_e2e is 0 ptp4l[10362.429]: config item /var/run/ptp4l.fault_badpeernet_interval is 16 ptp4l[10362.429]: config item /var/run/ptp4l.fault_reset_interval is 4 ptp4l[10362.429]: config item /var/run/ptp4l.tsproc_mode is 0 ptp4l[10362.430]: config item /var/run/ptp4l.delay_filter is 1 ptp4l[10362.430]: config item /var/run/ptp4l.delay_filter_length is 1 ptp4l[10362.430]: config item (null).slave_event_monitor is '' ptp4l[10362.430]: config item eth0.boundary_clock_jbod is 0 ptp4l[10362.430]: config item eth0.network_transport is 1 ptp4l[10362.430]: config item eth0.masterOnly is 0 ptp4l[10362.431]: config item eth0.BMCA is 0 ptp4l[10362.431]: config item eth0.delayAsymmetry is 0 ptp4l[10362.431]: config item eth0.follow_up_info is 0 ptp4l[10362.431]: config item eth0.freq_est_interval is 1 ptp4l[10362.431]: config item eth0.msg_interval_request is 0 ptp4l[10362.431]: config item eth0.net_sync_monitor is 0 ptp4l[10362.432]: config item eth0.path_trace_enabled is 0 ptp4l[10362.432]: config item eth0.tc_spanning_tree is 0 ptp4l[10362.432]: config item eth0.ingressLatency is 0 ptp4l[10362.432]: config item eth0.egressLatency is 0 ptp4l[10362.432]: config item eth0.delay_mechanism is 2 ptp4l[10362.432]: config item eth0.unicast_master_table is 0 ptp4l[10362.433]: config item eth0.unicast_listen is 0 ptp4l[10362.433]: config item eth0.hybrid_e2e is 0 ptp4l[10362.433]: config item eth0.fault_badpeernet_interval is 16 ptp4l[10362.433]: config item eth0.fault_reset_interval is 4 ptp4l[10362.433]: config item eth0.tsproc_mode is 0 ptp4l[10362.433]: config item eth0.delay_filter is 1 ptp4l[10362.434]: config item eth0.delay_filter_length is 10 ptp4l[10362.434]: config item eth0.logMinDelayReqInterval is 0 ptp4l[10362.434]: config item eth0.logAnnounceInterval is 1 ptp4l[10362.434]: config item eth0.inhibit_announce is 0 ptp4l[10362.434]: config item eth0.ignore_source_id is 0 ptp4l[10362.434]: config item eth0.announceReceiptTimeout is 3 ptp4l[10362.435]: config item eth0.syncReceiptTimeout is 0 ptp4l[10362.435]: config item eth0.transportSpecific is 0 ptp4l[10362.435]: config item eth0.ignore_transport_specific is 0 ptp4l[10362.435]: config item eth0.G.8275.portDS.localPriority is 128 ptp4l[10362.435]: config item eth0.logSyncInterval is 0 ptp4l[10362.436]: config item eth0.operLogSyncInterval is 0 ptp4l[10362.436]: config item eth0.logMinPdelayReqInterval is 0 ptp4l[10362.436]: config item eth0.operLogPdelayReqInterval is 0 ptp4l[10362.436]: config item eth0.neighborPropDelayThresh is 20000000 ptp4l[10362.436]: config item eth0.min_neighbor_prop_delay is -20000000 ptp4l[10362.436]: config item eth0.asCapable is 1 ptp4l[10362.437]: config item eth0.inhibit_delay_req is 0 ptp4l[10362.437]: config item eth0.udp_ttl is 1 ptp4l[10362.453]: config item (null).dscp_event is 0 ptp4l[10362.453]: config item (null).dscp_general is 0 ptp4l[10362.453]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[10362.453]: config item /var/run/ptp4l.logMinDelayReqInterval is 0 ptp4l[10362.454]: config item /var/run/ptp4l.logAnnounceInterval is 1 ptp4l[10362.454]: config item /var/run/ptp4l.inhibit_announce is 0 ptp4l[10362.454]: config item /var/run/ptp4l.ignore_source_id is 0 ptp4l[10362.454]: config item /var/run/ptp4l.announceReceiptTimeout is 0 ptp4l[10362.454]: config item /var/run/ptp4l.syncReceiptTimeout is 0 ptp4l[10362.454]: config item /var/run/ptp4l.transportSpecific is 0 ptp4l[10362.454]: config item /var/run/ptp4l.ignore_transport_specific is 0 ptp4l[10362.455]: config item /var/run/ptp4l.G.8275.portDS.localPriority is 128 ptp4l[10362.455]: config item /var/run/ptp4l.logSyncInterval is 0 ptp4l[10362.455]: config item /var/run/ptp4l.operLogSyncInterval is 0 ptp4l[10362.455]: config item /var/run/ptp4l.logMinPdelayReqInterval is 0 ptp4l[10362.455]: config item /var/run/ptp4l.operLogPdelayReqInterval is 0 ptp4l[10362.455]: config item /var/run/ptp4l.neighborPropDelayThresh is 20000000 ptp4l[10362.455]: config item /var/run/ptp4l.min_neighbor_prop_delay is -20000000 ptp4l[10362.455]: config item /var/run/ptp4l.asCapable is 1 ptp4l[10362.456]: config item /var/run/ptp4l.inhibit_delay_req is 0 ptp4l[10362.456]: config item (null).uds_address is '/var/run/ptp4l' ptp4l[10362.456]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[10362.456]: port 1: received link status notification ptp4l[10362.456]: interface index 2 is up ptp4l[10363.453]: port 1: delay timeout ptp4l[10364.454]: port 1: delay timeout ptp4l[10364.454]: port 1: setting asCapable ptp4l[10365.454]: port 1: delay timeout ptp4l[10366.454]: port 1: delay timeout ptp4l[10367.454]: port 1: delay timeout ptp4l[10368.454]: port 1: delay timeout ptp4l[10368.897]: port 1: announce timeout ptp4l[10368.897]: selected local clock 0001c0.fffe.1f4c9b as best master ptp4l[10369.454]: port 1: delay timeout ptp4l[10370.454]: port 1: delay timeout ptp4l[10371.454]: port 1: delay timeout ptp4l[10372.454]: port 1: delay timeout ptp4l[10373.455]: port 1: delay timeout ptp4l[10374.455]: port 1: delay timeout ptp4l[10375.455]: port 1: delay timeout ptp4l[10375.488]: port 1: announce timeout ptp4l[10375.488]: selected local clock 0001c0.fffe.1f4c9b as best master [...] On the client I receive Announce, Peer_Delay_Req, Sync, Follow_Up messages PTP packets (tcpdump -i eth0 udp): [...] 16:51:38.914947 IP 192.168.0.10.ptp-general > ptp-primary.mcast.net.ptp-general: PTPv2, v1 compat : no, msg type : announce msg, length : 64, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x3ceceffffe0384c9, port id : 1, seq id : 4, control : 5 (Other), log message interval : 1, originTimeStamp : 0 seconds 0 nanoseconds, origin cur utc :37, rsvd : 0, gm priority_1 : 128, gm clock class : 248, gm clock accuracy : 254, gm clock variance : 65535, gm priority_2 : 128, gm clock id : 0x3ceceffffe0384c9, steps removed : 0, time source : 0xa0 16:51:39.197767 IP 192.168.0.10.ptp-event > 224.0.0.107.ptp-event: PTPv2, v1 compat : no, msg type : peer delay req msg, length : 54, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x3ceceffffe0384c9, port id : 1, seq id : 15, control : 5 (Other), log message interval : 127, preciseOriginTimeStamp : 0 seconds, 0 nanoseconds, port identity : 0x0, port id : 0 16:51:39.914281 IP 192.168.0.10.ptp-event > ptp-primary.mcast.net.ptp-event: PTPv2, v1 compat : no, msg type : sync msg, length : 44, domain : 0, reserved1 : 0, Flags [two step], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x3ceceffffe0384c9, port id : 1, seq id : 8, control : 0 (sync msg), log message interval : 0, originTimeStamp : 0 seconds, 0 nanoseconds 16:51:39.914292 IP 192.168.0.10.ptp-general > ptp-primary.mcast.net.ptp-general: PTPv2, v1 compat : no, msg type : follow up msg, length : 44, domain : 0, reserved1 : 0, Flags [none], NS correction : 0, sub NS correction : 0, reserved2 : 0, clock identity : 0x3ceceffffe0384c9, port id : 1, seq id : 8, control : 2 (peer delay req msg), log message interval : 0, preciseOriginTimeStamp : 1693318221 seconds, 580595169 nanoseconds [...] |
From: Nobin M. <nob...@gm...> - 2023-08-23 08:16:33
|
Hi I have a node synced to external GM, on bringing the node interface down, the system is still showing in sync state. PTP configuration: [global] # # Default Data Set # tx_timestamp_timeout 50 twoStepFlag 1 slaveOnly 1 priority1 128 priority2 128 domainNumber 24 #utc_offset 37 clockClass 255 clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF free_running 0 freq_est_interval 1 or "[{\"name\":\"pool3_profile\",\"interface\":\"0000:4b:00.0\",\"ptp4lOpts\":\"-s -2\",\"phc2sysOpts\":\"-a -r -n 24 --step_threshold=1 --summary_interval -4\",\"ptp4lConf\":\"[global]\\n#\\n# Default Data Set\\n#\\ntx_timestamp_timeout 50\\ntwoStepFlag 1\\nslaveOnly 1\\npriority1 128\\npriority2 128\\ndomainNumber 24\\n#utc_offset 37\\nclockClass 255\\nclockAccuracy 0xFE\\noffsetScaledLogVariance 0xFFFF\\nfree_running 0\\nfreq_est_interval 1\\n\",\"ptpSchedulingPolicy\":\"SCHED_FIFO\",\"ptpSchedulingPriority\":10,\"ptpClockThreshold\":{\"holdOverTimeout\":5,\"maxOffsetThreshold\":600,\"minOffsetThreshold\":-600}}]" }, ptp4l & phc2sys logs: I0823 06:21:35.362239 931306 daemon.go:136] Phc2sysOpts: -a -r -n 24 --step_threshold=1 --summary_interval -4 -m -z /var/run/ptp4l.0.socket -t [ptp4l.0.config] I0823 06:21:35.362242 931306 daemon.go:136] PtpSchedulingPolicy: SCHED_FIFO I0823 06:21:35.362245 931306 daemon.go:140] PtpSchedulingPriority: 10 I0823 06:21:35.362248 931306 daemon.go:207] ------------------------------------ I0823 06:21:35.362253 931306 daemon.go:317] /bin/chrt -f 10 /usr/sbin/phc2sys -a -r -n 24 --step_threshold=1 --summary_interval -4 -m -z /var/run/ptp4l.0.socket -t [ptp4l.0.config] I0823 06:21:35.362288 931306 daemon.go:317] /bin/chrt -f 10 /usr/sbin/ptp4l -f /var/run/ptp4l.0.config -s -2 -m I0823 06:21:36.362339 931306 daemon.go:370] Starting phc2sys... I0823 06:21:36.362353 931306 daemon.go:371] phc2sys cmd: /bin/chrt -f 10 /usr/sbin/phc2sys -a -r -n 24 --step_threshold=1 --summary_interval -4 -m -z /var/run/ptp4l.0.socket -t [ptp4l.0.config] I0823 06:21:36.362449 931306 daemon.go:347] phc2sys[1692771696]:[ptp4l.0.config] PTP_PROCESS_STATUS:1 I0823 06:21:37.362513 931306 daemon.go:370] Starting ptp4l... I0823 06:21:37.362534 931306 daemon.go:371] ptp4l cmd: /bin/chrt -f 10 /usr/sbin/ptp4l -f /var/run/ptp4l.0.config -s -2 -m I0823 06:21:37.362642 931306 daemon.go:347] ptp4l[1692771697]:[ptp4l.0.config] PTP_PROCESS_STATUS:1 phc2sys[110285.573]: [ptp4l.0.config] Waiting for ptp4l... option slaveOnly is deprecated, please use clientOnly instead ptp4l[110285.573]: [ptp4l.0.config] selected /dev/ptp5 as PTP clock ptp4l[110285.618]: [ptp4l.0.config] port 1 (ens2f0): INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[110285.618]: [ptp4l.0.config] port 0 (/var/run/ptp4l.0.socket): INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[110285.618]: [ptp4l.0.config] port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[110285.618]: [ptp4l.0.config] port 1 (ens2f0): LISTENING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[110285.618]: [ptp4l.0.config] port 1 (ens2f0): unexpected socket error ptp4l[110285.682]: [ptp4l.0.config] port 1 (ens2f0): link down ptp4l[110285.682]: [ptp4l.0.config] selected local clock b49691.fffe.bafa00 as best master ptp4l[110285.682]: [ptp4l.0.config] port 1 (ens2f0): master state recommended in slave only mode ptp4l[110285.682]: [ptp4l.0.config] port 1 (ens2f0): assuming the grand master role ptp4l[110285.682]: [ptp4l.0.config] port 1 (ens2f0): defaultDS.priority1 probably misconfigured phc2sys[110286.573]: [ptp4l.0.config] Waiting for ptp4l... phc2sys[110287.574]: [ptp4l.0.config] reconfiguring after port state change phc2sys[110287.574]: [ptp4l.0.config] selecting ens2f0 for synchronization phc2sys[110287.574]: [ptp4l.0.config] selecting CLOCK_REALTIME as the master clock phc2sys[110287.574]: [ptp4l.0.config] ens2f0 sys offset 37 s0 freq -13085 delay 435 phc2sys[110288.575]: [ptp4l.0.config] ens2f0 sys offset 23 s2 freq -13099 delay 504 phc2sys[110289.575]: [ptp4l.0.config] ens2f0 sys offset 30 s2 freq -13069 delay 504 phc2sys[110290.576]: [ptp4l.0.config] ens2f0 sys offset 6 s2 freq -13084 delay 514 phc2sys[110291.576]: [ptp4l.0.config] ens2f0 sys offset 3 s2 freq -13085 delay 505 phc2sys[110292.576]: [ptp4l.0.config] ens2f0 sys offset -19 s2 freq -13106 delay 506 phc2sys[110293.577]: [ptp4l.0.config] ens2f0 sys offset -29 s2 freq -13122 delay 504 phc2sys[110294.577]: [ptp4l.0.config] ens2f0 sys offset -14 s2 freq -13116 delay 504 phc2sys[110295.578]: [ptp4l.0.config] ens2f0 sys offset 1 s2 freq -13105 delay 510 timedatectl output: eccd@pool3-dc286-wk3-srv5-1003:~> timedatectl Local time: Wed 2023-08-23 07:17:42 UTC Universal time: Wed 2023-08-23 07:17:42 UTC RTC time: Wed 2023-08-23 07:17:42 Time zone: UTC (UTC, +0000) System clock synchronized: yes NTP service: inactive RTC in local TZ: no I think phc2sys is still syncing to the local phc clock in nic. I was thinking node will go to a non synchronized state on interface down, why is it taking the GM role, even after giving clientOnly option? Any pointers? -Nobin |
From: Andrea A. <and...@bd...> - 2023-08-18 11:50:56
|
Hi, we are trying to make ptp4l working with 2 arm devices (iMX8) connected to an AVB switch (MOTU). Connecting the two devices directly and running ptp4l with a standard configuration file make it works and one of the two become slave to the other: # # 802.1AS example configuration containing those attributes which # differ from the defaults. See the file, default.cfg, for the # complete list of available options. # [global] gmCapable 1 priority1 248 priority2 248 logAnnounceInterval 0 logSyncInterval -3 syncReceiptTimeout 3 neighborPropDelayThresh 800 min_neighbor_prop_delay -20000000 assume_two_step 1 path_trace_enabled 1 follow_up_info 1 transportSpecific 0x1 ptp_dst_mac 01:80:C2:00:00:0E network_transport L2 delay_mechanism P2P Running the same with the two devices connected to the switch doesn't work and it seems like they don't see each other. Reducing priority1 to a value smaller than the switch one (e.g. 240) make both devices to become grand master and not synchronized. Making the two devices to be slave only makes them both to be slave to the switch and we can see that they get synchronized. Here is the config file (found in some automotive configuration): # # Automotive Profile example configuration for clients containing those # attributes which differ from the defaults. See the file, default.cfg, for # the complete list of available options. # [global] # # Options carried over from gPTP. # gmCapable 1 priority1 248 priority2 248 logSyncInterval -3 syncReceiptTimeout 3 neighborPropDelayThresh 800 min_neighbor_prop_delay -20000000 assume_two_step 1 path_trace_enabled 1 follow_up_info 1 transportSpecific 0x1 ptp_dst_mac 01:80:C2:00:00:0E network_transport L2 delay_mechanism P2P # # Automotive Profile specific options # BMCA noop slaveOnly 1 inhibit_announce 1 asCapable true ignore_source_id 1 # Required to quickly correct Time Jumps in master step_threshold 1 operLogSyncInterval 0 operLogPdelayReqInterval 2 msg_interval_request 1 servo_offset_threshold 30 servo_num_offset_values 10 The problem is that in this way the date is set on both devices to 1970 and then we can't run any internet service. Does anyone know how to make ptp4l work whith complex network with AVB switches? We think we are missing a piece. Thank you, Andrea Albano Andrea Albano Director of Engineering BdSound Palazzo R2, Strada 7, Milanofiori 20089 Rozzano (MI) - Italy Tel.: +39 0289950230 Mob: +39 3666531597 Email: and...@bd... www.bdsound.com<http://www.bdsound.com/> [cid:template13_sm_fb_18d17647-954c-4110-871a-7113c8c0de9a11111.png] <https://www.facebook.com/bdsound.srl/> [cid:template13_sm_linkedin_5d790cd9-4767-49a2-bbb7-5bc1b350de8311111.png] <https://it.linkedin.com/company/bdsound-srl> [cid:template13_sm_twitter_bbd37982-0cdf-4e18-9c44-2326e4c7fc8911111.png] <https://twitter.com/bdsound?lang=it> <https://plus.google.com/+Bdsound> <https://www.bdsound.com/news/2019/06/bdsound-sensors-expo-2019-san-jose-ca/><https://www.bdsound.com/we-wont-stop/><https://developer.amazon.com/en-US/alexa/alexa-live><https://www.bdsound.com/alexa?utm_campaign=cps&utm_source=sign&utm_medium=email&utm_content=banner&utm_term=cps+bd><https://www.bdsound.com/bdsound-becomes-an-amazon-alexa-cps-provider/?utm_campaign=cps&utm_source=sign&utm_medium=email&utm_content=btmbnn&utm_term=cps+bd><https://www.bdsound.com/news/2019/06/visit-us-at-stmicroelectronics-techno-day-italy-2019/><https://www.bdsound.com/contact/> <http://www.bdsound.com/kiosks> <https://www.bdsound.com/contact/> <http://www.bdsound.com/news/2018/06/bdsound-sensors-expo-2018-san-jose-ca/><http://www.bdsound.com/news/2018/06/bdsound-sensors-expo-2018-san-jose-ca/>P.IVA: IT02177500184 Informativa ex artt. 13 e 14 del Regolamento UE 2016/679 sul sito https://www.bdsound.com/privacy-policy/ This e-mail (and any attachment(s)) is strictly confidential and for use only by intended recipient(s). Any opinions therein expressed are those of the author and do not necessarily mirror the views and opinions of BdSound. Therefore its content doesn't represent any commitment between BdSound and the recipient(s) and BdSound has no liability or responsibility for the above mentioned content. Il contenuto e gli allegati di questo messaggio sono strettamente confidenziali, e ne sono vietati la diffusione e l'uso non autorizzato. Le opinioni ivi eventualmente espresse sono quelle dell'autore e non riflettono necessariamente le opinioni ed il punto di vista di BdSound. Di conseguenza il messaggio non costituisce impegno contrattuale tra BdSound ed il destinatario, e BdSound non assume alcuna responsabilità riguardo ai contenuti del testo e dei relativi allegati, né per eventuali intercettazioni, modifiche o danneggiamenti. |
From: John K. <jk...@ou...> - 2023-08-14 20:52:23
|
I apologize for my ignorance but I'm not sure how to implement that all in a single configuration file. I currently have two very generic configuration files. The first is used on the primary interface as the 1588 slave: *[global]* *slaveOnly 1* *time_stamping hardware* *step_threshold 1.0* *delay_mechanism Auto* *network_transport UDPv4* *[enp11s0]* The second configuration file is the default automotive-master.cfg profile: https://github.com/richardcochran/linuxptp/blob/master/configs/automotive-master.cfg I run the primary configuration file like this: ptp4l -f <path_to_file> For the other interfaces I run: *ptp4l -f /etc/automotive-master.cfg -i <interface_name>* I can add --boundary_clock_jbod to my automotive-master.cfg file and add the automotive interfaces and a boundary clock is properly formed between them. However, I don't know how to create a configuration file of dissimilar PTP instances on different interfaces. I will keep investigating and experimenting while I await a reply. On Fri, Aug 11, 2023 at 9:24 PM Richard Cochran <ric...@gm...> wrote: > On Fri, Aug 11, 2023 at 12:32:24PM -0600, John Koch via Linuxptp-users > wrote: > > I was wondering what the best way to configure ptp4l and phc2sys in the > > following configuration would be. > > > > There is a 1588 IPv4 PTP master present on the network. My computer has > > several NICs which have PTP hardware support, one of them is plugged into > > the network with the 1588 IPv4 master. I also have multiple devices which > > are 802.1AS automotive slaves that I want to synchronize with the rest of > > the devices on the 1588 network. Currently I have connected each of the > > 802.1AS automotive slaves to an individual NIC on my computer and run an > > instance of ptp4l and phc2sys for each slave. > > > > Is there a better way of doing this? If so could someone provide some > > guidance? > > You can run: > > - one ptp4l instance as a Boundary Clock with 1588 on the slave port > and gPTP on the master ports (using a configuration file) > > - one phc2sys in "automatic" (-a) mode with --boundary_clock_jbod > > That will make the gPTP clients synchronize to the 1588 IPv4 master. > > HTH, > Richard > > |
From: Richard C. <ric...@gm...> - 2023-08-12 03:24:52
|
On Fri, Aug 11, 2023 at 12:32:24PM -0600, John Koch via Linuxptp-users wrote: > I was wondering what the best way to configure ptp4l and phc2sys in the > following configuration would be. > > There is a 1588 IPv4 PTP master present on the network. My computer has > several NICs which have PTP hardware support, one of them is plugged into > the network with the 1588 IPv4 master. I also have multiple devices which > are 802.1AS automotive slaves that I want to synchronize with the rest of > the devices on the 1588 network. Currently I have connected each of the > 802.1AS automotive slaves to an individual NIC on my computer and run an > instance of ptp4l and phc2sys for each slave. > > Is there a better way of doing this? If so could someone provide some > guidance? You can run: - one ptp4l instance as a Boundary Clock with 1588 on the slave port and gPTP on the master ports (using a configuration file) - one phc2sys in "automatic" (-a) mode with --boundary_clock_jbod That will make the gPTP clients synchronize to the 1588 IPv4 master. HTH, Richard |
From: John K. <jk...@ou...> - 2023-08-11 20:25:15
|
I was wondering what the best way to configure ptp4l and phc2sys in the following configuration would be. There is a 1588 IPv4 PTP master present on the network. My computer has several NICs which have PTP hardware support, one of them is plugged into the network with the 1588 IPv4 master. I also have multiple devices which are 802.1AS automotive slaves that I want to synchronize with the rest of the devices on the 1588 network. Currently I have connected each of the 802.1AS automotive slaves to an individual NIC on my computer and run an instance of ptp4l and phc2sys for each slave. Is there a better way of doing this? If so could someone provide some guidance? Thanks, John |
From: jmfriedt <jmf...@fe...> - 2023-07-25 10:09:11
|
I have just realized that the freq field in the /var/log/messages log file of phc2sys is representative of the CPU (system clock) and should provide the information needed for synthonization. (and I now realize the 37 s from my previous post is UTC-TAI) Thanks, Jean-Michel -- JM Friedt, FEMTO-ST Time & Frequency, 26 rue de l'Epitaphe, 25000 Besancon, France |
From: jmfriedt <jmf...@fe...> - 2023-07-25 06:27:13
|
> So I would now like to try and synchonize the CPU clock on the PHC sorry for the typo, that should read "and synthonize the CPU clock", Jean-Michel |
From: jmfriedt <jmf...@fe...> - 2023-07-25 06:17:55
|
On Mon, 24 Jul 2023 09:17:10 +0200 Miroslav Lichvar <mli...@re...> wrote: > On Sat, Jul 22, 2023 at 04:12:32PM +0200, jmfriedt wrote: > > To do this I am connecting an Ettus Research X310 software defined > > radio to the CM4 and configuring to start collecting data upon > > detection of the WR 1PPS rising edge. The SDR input is connected to > > the 1PPS to assess that the record always stays at the same time > > with respect to the 1PPS and it does. I record a known number of > > samples in file.bin at a known datarate (5 MS/s) and look at the > > timestamp of the last file access as the last field of stat -c %y > > file.bin, and I try and analyze the factional part of this > > timestamp. > > How exactly you are writing to that file? Any buffering or fsync()? > > I think the modified timestamp of a file is captured by the kernel > when it's updating the inode. The system clock might be precise to few > tens of nanoseconds, but that update of the inode certainly cannot be > timed to such precision. This is exactly what I am interested in learning: the impact of the operating system and the filesystem on the timestamping capability at the userspace level. The file storage is handled at a very high level by a Python script generated by GNU Radio Companion using a File Sink with unbuffered(False) so indeed there is buffering occuring, thank you for pointing that out. Attached is the result whan the CPU clock is generated by a synthesizer controlled by the GM reference. In tihs case the system clock v.s PHC clock offset is cancelled and I am only left with what I believe to be system jitter, which I calculate as about 3 us after removing outliers. So I would now like to try and synchonize the CPU clock on the PHC information. However I fail to identify the time (frequency) offset without the external truth of the SDR records. I don't understand the "freq" field of ptp4l but I believe this is related to the PHY oscillator, not the CPU oscillator as this field is not changing significantly when I change the CPU frequency. Also I try to read testptp -k 10 but that too I cannot understand: since phc2sys is constantly updating sys with phc I believe, how come that testptp -k tells me system/phc clock time offset is 37 s? Furthermore this quantity also does not represent the frequency offset of the CPU driving oscillator wrt its nominal frequency. I tried reading the various outputs of pmc but since this is the PTP management part, probably it will not relate to system time. So I fail to identify an indicator of system frequency vs PHC frequency difference that would allow me to steer the CPU clock to its nominal frequency. Thank you, Jean-Michel -- JM Friedt, FEMTO-ST Time & Frequency, 26 rue de l'Epitaphe, 25000 Besancon, France |
From: Miroslav L. <mli...@re...> - 2023-07-24 07:17:28
|
On Sat, Jul 22, 2023 at 04:12:32PM +0200, jmfriedt wrote: > To do this I am connecting an Ettus Research X310 software defined > radio to the CM4 and configuring to start collecting data upon > detection of the WR 1PPS rising edge. The SDR input is connected to the > 1PPS to assess that the record always stays at the same time with > respect to the 1PPS and it does. I record a known number of samples in > file.bin at a known datarate (5 MS/s) and look at the timestamp of the > last file access as the last field of stat -c %y file.bin, and I try > and analyze the factional part of this timestamp. How exactly you are writing to that file? Any buffering or fsync()? I think the modified timestamp of a file is captured by the kernel when it's updating the inode. The system clock might be precise to few tens of nanoseconds, but that update of the inode certainly cannot be timed to such precision. -- Miroslav Lichvar |
From: jmfriedt <jmf...@fe...> - 2023-07-22 14:13:12
|
Thanks to the help I received earlier I am now able to control the Compute Module 4 (CM4) on (White Rabbit) PTP, NTP or GPS. I am trying to understand the meaning of the 9 digits Linux is providing when reading an inode state with "stat -c %y" and how many decimals are actually relevant. To do this I am connecting an Ettus Research X310 software defined radio to the CM4 and configuring to start collecting data upon detection of the WR 1PPS rising edge. The SDR input is connected to the 1PPS to assess that the record always stays at the same time with respect to the 1PPS and it does. I record a known number of samples in file.bin at a known datarate (5 MS/s) and look at the timestamp of the last file access as the last field of stat -c %y file.bin, and I try and analyze the factional part of this timestamp. I get the attached chart which is a 16 hours long measurement with one measurement every 16 s. I understand that the slope of the sawtooth (inset) is the frequency difference between the oscillator driving the processor and the PTP time as I was able to check by clocking the CM4 with an external synthesizer locked to the WR source (hydrogen maser). What I cannot understand is the sawtooth shape and the relation to the kernel CONFIG_HZ_250 setting, since changing to CONFIG_HZ_300 or CONFIG_HZ_1000 does change the sawtooth amplitude from 4 to 3 ms and then to negligible (~ms but not looking like a sawtooth anymore) amplitude. I have also checked that by clocking the CM4 CPU with a synthesizer locked to the WR GM reference, the sawtooth is gone and I am left with the +/-5 us I attribute to kernel syscall latency fluctuation. Can anyone point me to some literature describing the transfer from PHY PTP time to Linux kernel time and how it affects these timestamps? also where the sawtooth comes from and its relation to the CONFIG_HZ kernel setting? In general I wonder, when I read NTP to be ms accuracy and PTP being nanosecond, how do users actually use such resolution (which I can indeed observe on the PTP 1-PPS output from the PHY) at the operating system level when the kernel itself timestamps with several ms granuarity? With White Rabbit I can access the 10 MHz and 1PPS output that allow me synthesizing any frequency I need in an application, but PTP only provides the timestamp information which I understand to be transferred to the operating system by phc2sys and I see then the impact of the operating system timer granularity it seems. I also cannot understand the long term (7-8 hour period) slow drift visible on the top chart. I have verified that the PHY oscillator frequency does not impact the result, only the CPU oscillator, which might be expected if PTP is not only sharing the time transfer delay but also the time to correct for PHY clock drift. Thank you, Jean-Michel -- JM Friedt, FEMTO-ST Time & Frequency, 26 rue de l'Epitaphe, 25000 Besancon, France |