Re: [Linuxptp-users] PTP client won't sync on a specific hardware
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
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 > [...] > |