Dear ptp4l-devs,

we try to sync embedded devices, which are only capable of PTP_TWO_STEP=FALSE (aka twoStepFlag=0 aka one-way-sync aka PTP_Sync=1) syncing, with our Ubuntu Linux host (System overview below). When we run the self build ptp4l via "./ptp4l -m -l7 -2 -H -i enp0s25 -E -f /etc/ptp4l.conf" (see config etc. below), the execution hangs for all ptp4l versions > 1.7 at "INITIALIZING to LISTENING on INIT_COMPLETE". If we comment the corresponding line [1] where ptp4l hangs, its start sending the SYNC_MESSAGE etc. and the log goes on with:

...
ptp4l[5819.030]: config item enp9s0f0.ptp_dst_mac is '01:1B:19:00:00:00'
ptp4l[5819.030]: config item enp9s0f0.p2p_dst_mac is '01:80:C2:00:00:0E'
ptp4l[5819.088]: driver rejected most general HWTSTAMP filter
ptp4l[5819.089]: ioctl SIOCSHWTSTAMP failed: Numerical result out of range
ptp4l[5819.089]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[5819.089]: config item /var/run/ptp4l.logMinDelayReqInterval is 0
...
Everthing after INITIALIZING to LISTENING on INIT_COMPLETE:
ptp4l[5819.089]: port 1: received link status notification
ptp4l[5819.089]: interface index 4 is up
ptp4l[5825.191]: port 1: announce timeout
ptp4l[5825.191]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[5825.191]: selected local clock a0369f.fffe.86a9d8 as best master
ptp4l[5825.191]: assuming the grand master role
ptp4l[5825.192]: port 1: master tx announce timeout
ptp4l[5825.192]: port 1: setting asCapable
ptp4l[5826.191]: port 1: master sync timeout
ptp4l[5826.193]: port 1: received DELAY_REQ without timestamp
ptp4l[5827.191]: port 1: master sync timeout
ptp4l[5827.192]: port 1: master tx announce timeout
ptp4l[5827.724]: port 1: received DELAY_REQ without timestamp
ptp4l[5828.191]: port 1: master sync timeout
... etc


However, while investigating the packages via wireshark it turns out that all timestamps for all messages sent from the Ubuntu host are 0 (correction, correctionSubNs, OriginTimestamp seconds/nanoseconds) for the SYNC_ and ANNOUNCE_MESSAGE. When using twoStepFlag=1, the timestamps remain 0, but a FOLLOWUP_MESSAGE is sent with the correct OriginTimestampPrecise times.

We followed the instructions from [2] and [3] without success.
We also tried another PTP hardware capable intel network card with e1000e driver with the exact same log messages. We also tried all versions from 1.8 to master branch, while version <= 1.7 ignores the twoStepFlag=0 option. However, software timestamping and twoStepFlag=1 works between two linux hosts

Does anyone see our fault or has similar issues?

Kind regards,
Timo

[1] https://github.com/richardcochran/linuxptp/blob/d663a483c40939bad58301c256d86da1f3da6cc0/sk.c#L99 [2] https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.ptp.html [3] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-synchronizing_the_clocks

*** Ubuntu System Overview ***
*
Ubuntu 18.04.1 with current 4.18 kernel uname -a:* Linux user 4.18.0-13-generic #14~18.04.1-Ubuntu SMP Thu Dec 6 14:09:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
*
Kernel Flags:* CONFIG_PTP_1588_CLOCK=y, CONFIG_PPS=y, CONFIG_NETWORK_PHY_TIMESTAMPING=y
*
ptp4l build command:* chmod 777 *.sh; export ARCH="x86"; export CROSS_COMPILE=""; export KBUILD_OUTPUT="${HOME}/kernel/ptp_ubuntu"; mkdir -p ${KBUILD_OUTPUT}; cp /boot/config-$(uname -r) ${KBUILD_OUTPUT}/.config; make oldnoconfig; make menuconfig; time make -j4; make headers_install
*
Network card: *Intel i350*

Network driver: *$ modinfo igb
filename: /lib/modules/4.18.0-13-generic/kernel/drivers/net/ethernet/intel/igb/igb.ko
version:        5.4.0-k

*/etc/ptp4l.conf:*
[global]
priority1       127
twoStepFlag       0

*ethtool -T enp9s0f0:*
Time stamping parameters for enp9s0f0:
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)

*** Log of ptp4l ***
ptp4l[5166.935]: config item (null).assume_two_step is 0
ptp4l[5166.935]: config item (null).check_fup_sync is 0
ptp4l[5166.935]: config item (null).tx_timestamp_timeout is 1
ptp4l[5166.935]: config item (null).clock_servo is 0
ptp4l[5166.935]: config item (null).clock_type is 32768
ptp4l[5166.935]: config item (null).clock_servo is 0
ptp4l[5166.935]: config item (null).clockClass is 248
ptp4l[5166.935]: config item (null).clockAccuracy is 254
ptp4l[5166.935]: config item (null).offsetScaledLogVariance is 65535
ptp4l[5166.935]: config item (null).productDescription is ';;'
ptp4l[5166.935]: config item (null).revisionData is ';;'
ptp4l[5166.936]: config item (null).userDescription is ''
ptp4l[5166.936]: config item (null).manufacturerIdentity is '00:00:00'
ptp4l[5166.936]: config item (null).domainNumber is 0
ptp4l[5166.936]: config item (null).slaveOnly is 0
ptp4l[5166.936]: config item (null).gmCapable is 1
ptp4l[5166.936]: config item (null).gmCapable is 1
ptp4l[5166.936]: config item (null).G.8275.defaultDS.localPriority is 128
ptp4l[5166.936]: config item (null).time_stamping is 1
ptp4l[5166.936]: config item (null).twoStepFlag is 0
ptp4l[5166.936]: upgrading to one step time stamping in order to match the twoStepFlag
ptp4l[5166.936]: locked item global.time_stamping as 3
ptp4l[5166.936]: config item (null).twoStepFlag is 0
ptp4l[5166.936]: config item (null).time_stamping is 3
ptp4l[5166.936]: config item (null).priority1 is 127
ptp4l[5166.936]: config item (null).priority2 is 128
ptp4l[5166.936]: interface index 4 is up
ptp4l[5166.936]: config item (null).free_running is 0
ptp4l[5166.936]: selected /dev/ptp0 as PTP clock
ptp4l[5166.936]: config item (null).uds_address is '/var/run/ptp4l'
ptp4l[5166.936]: section item /var/run/ptp4l.announceReceiptTimeout now 0
ptp4l[5166.936]: section item /var/run/ptp4l.delay_mechanism now 0
ptp4l[5166.936]: section item /var/run/ptp4l.network_transport now 0
ptp4l[5166.937]: section item /var/run/ptp4l.delay_filter_length now 1
ptp4l[5166.937]: config item (null).free_running is 0
ptp4l[5166.937]: config item (null).freq_est_interval is 1
ptp4l[5166.937]: config item (null).gmCapable is 1
ptp4l[5166.937]: config item (null).kernel_leap is 1
ptp4l[5166.937]: config item (null).utc_offset is 37
ptp4l[5166.937]: config item (null).timeSource is 160
ptp4l[5166.937]: config item (null).pi_proportional_const is 0.000000
ptp4l[5166.937]: config item (null).pi_integral_const is 0.000000
ptp4l[5166.937]: config item (null).pi_proportional_scale is 0.000000
ptp4l[5166.937]: config item (null).pi_proportional_exponent is -0.300000
ptp4l[5166.937]: config item (null).pi_proportional_norm_max is 0.700000
ptp4l[5166.937]: config item (null).pi_integral_scale is 0.000000
ptp4l[5166.937]: config item (null).pi_integral_exponent is 0.400000
ptp4l[5166.937]: config item (null).pi_integral_norm_max is 0.300000
ptp4l[5166.937]: config item (null).step_threshold is 0.000000
ptp4l[5166.937]: config item (null).first_step_threshold is 0.000020
ptp4l[5166.937]: config item (null).max_frequency is 900000000
ptp4l[5166.937]: config item (null).dataset_comparison is 0
ptp4l[5166.937]: config item (null).delay_filter_length is 10
ptp4l[5166.937]: config item (null).delay_filter is 1
ptp4l[5166.937]: config item (null).tsproc_mode is 0
ptp4l[5166.937]: config item (null).initial_delay is 0
ptp4l[5166.937]: config item (null).summary_interval is 0
ptp4l[5166.937]: config item (null).sanity_freq_limit is 200000000
ptp4l[5166.937]: PI servo: sync interval 1.000 kp 0.700 ki 0.300000
ptp4l[5166.937]: config item /var/run/ptp4l.boundary_clock_jbod is 0
ptp4l[5166.937]: config item /var/run/ptp4l.network_transport is 0
ptp4l[5166.937]: config item /var/run/ptp4l.delayAsymmetry is 0
ptp4l[5166.937]: config item /var/run/ptp4l.follow_up_info is 0
ptp4l[5166.937]: config item /var/run/ptp4l.freq_est_interval is 1
ptp4l[5166.937]: config item /var/run/ptp4l.net_sync_monitor is 0
ptp4l[5166.937]: config item /var/run/ptp4l.path_trace_enabled is 0
ptp4l[5166.937]: config item /var/run/ptp4l.tc_spanning_tree is 0
ptp4l[5166.937]: config item /var/run/ptp4l.ingressLatency is 0
ptp4l[5166.938]: config item /var/run/ptp4l.egressLatency is 0
ptp4l[5166.938]: config item /var/run/ptp4l.delay_mechanism is 0
ptp4l[5166.938]: config item /var/run/ptp4l.hybrid_e2e is 0
ptp4l[5166.938]: config item /var/run/ptp4l.fault_badpeernet_interval is 16
ptp4l[5166.938]: config item /var/run/ptp4l.fault_reset_interval is 4
ptp4l[5166.938]: config item /var/run/ptp4l.delay_filter_length is 1
ptp4l[5166.938]: config item /var/run/ptp4l.delay_filter is 1
ptp4l[5166.938]: config item /var/run/ptp4l.tsproc_mode is 0
ptp4l[5166.938]: config item enp9s0f0.boundary_clock_jbod is 0
ptp4l[5166.938]: config item enp9s0f0.network_transport is 3
ptp4l[5166.938]: config item enp9s0f0.delayAsymmetry is 0
ptp4l[5166.938]: config item enp9s0f0.follow_up_info is 0
ptp4l[5166.938]: config item enp9s0f0.freq_est_interval is 1
ptp4l[5166.938]: config item enp9s0f0.net_sync_monitor is 0
ptp4l[5166.938]: config item enp9s0f0.path_trace_enabled is 0
ptp4l[5166.938]: config item enp9s0f0.tc_spanning_tree is 0
ptp4l[5166.938]: config item enp9s0f0.ingressLatency is 0
ptp4l[5166.938]: config item enp9s0f0.egressLatency is 0
ptp4l[5166.938]: config item enp9s0f0.delay_mechanism is 1
ptp4l[5166.938]: config item enp9s0f0.unicast_master_table is 0
ptp4l[5166.938]: config item enp9s0f0.unicast_listen is 0
ptp4l[5166.938]: config item enp9s0f0.hybrid_e2e is 0
ptp4l[5166.938]: config item enp9s0f0.fault_badpeernet_interval is 16
ptp4l[5166.938]: config item enp9s0f0.fault_reset_interval is 4
ptp4l[5166.938]: config item enp9s0f0.delay_filter_length is 10
ptp4l[5166.938]: config item enp9s0f0.delay_filter is 1
ptp4l[5166.938]: config item enp9s0f0.tsproc_mode is 0
ptp4l[5166.938]: config item enp9s0f0.logMinDelayReqInterval is 0
ptp4l[5166.938]: config item enp9s0f0.logAnnounceInterval is 1
ptp4l[5166.938]: config item enp9s0f0.announceReceiptTimeout is 3
ptp4l[5166.938]: config item enp9s0f0.syncReceiptTimeout is 0
ptp4l[5166.938]: config item enp9s0f0.transportSpecific is 0
ptp4l[5166.938]: config item enp9s0f0.ignore_transport_specific is 0
ptp4l[5166.938]: config item enp9s0f0.masterOnly is 0
ptp4l[5166.938]: config item enp9s0f0.G.8275.portDS.localPriority is 128
ptp4l[5166.938]: config item enp9s0f0.logSyncInterval is 0
ptp4l[5166.938]: config item enp9s0f0.logMinPdelayReqInterval is 0
ptp4l[5166.939]: config item enp9s0f0.neighborPropDelayThresh is 20000000
ptp4l[5166.939]: config item enp9s0f0.min_neighbor_prop_delay is -20000000
ptp4l[5166.939]: config item enp9s0f0.ptp_dst_mac is '01:1B:19:00:00:00'
ptp4l[5166.939]: config item enp9s0f0.p2p_dst_mac is '01:80:C2:00:00:0E'
ptp4l[5166.972]: driver rejected most general HWTSTAMP filter
ptp4l[5166.972]: ioctl SIOCSHWTSTAMP failed: Numerical result out of range
ptp4l[5167.012]: port 1: INITIALIZING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)
ptp4l[5167.012]: config item /var/run/ptp4l.logMinDelayReqInterval is 0
ptp4l[5167.012]: config item /var/run/ptp4l.logAnnounceInterval is 1
ptp4l[5167.012]: config item /var/run/ptp4l.announceReceiptTimeout is 0
ptp4l[5167.012]: config item /var/run/ptp4l.syncReceiptTimeout is 0
ptp4l[5167.012]: config item /var/run/ptp4l.transportSpecific is 0
ptp4l[5167.012]: config item /var/run/ptp4l.ignore_transport_specific is 0
ptp4l[5167.012]: config item /var/run/ptp4l.masterOnly is 0
ptp4l[5167.012]: config item /var/run/ptp4l.G.8275.portDS.localPriority is 128
ptp4l[5167.012]: config item /var/run/ptp4l.logSyncInterval is 0
ptp4l[5167.012]: config item /var/run/ptp4l.logMinPdelayReqInterval is 0
ptp4l[5167.012]: config item /var/run/ptp4l.neighborPropDelayThresh is 20000000 ptp4l[5167.012]: config item /var/run/ptp4l.min_neighbor_prop_delay is -20000000
ptp4l[5167.012]: config item (null).uds_address is '/var/run/ptp4l'
ptp4l[5167.012]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE

--

Timo Korthals, M.Sc.
Universität Bielefeld
AG Kognitronik & Sensorik
Exzellenzcluster Cognitive Interaction Technology (CITEC)
Inspiration 1 (Zehlendorfer Damm 201)
33619 Bielefeld - Germany

Office  : 3.413
Phone   : +49 521 106-67367
eMail   : tkorth...@cit-ec.uni-bielefeld.de
Internet: http://www.ks.cit-ec.uni-bielefeld.de/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to