Menu

PTP Daemon not receiving announce packets on x86

Help
2017-01-08
2017-01-10
  • Marc Potter

    Marc Potter - 2017-01-08

    Version 2.3.1

    I have a problem running ptpd2 on an x86 (linux based) system. When I run two machines in master/slave mode with libpcap=y they do not appear to get each others announce messages. If I turn libpcap=n (on only 1 of the two machines), things work as expected so I know it is not a firewall or something like that. Leaving libpcap off causes the CPU to go up to 100% so that is not an option :(.

    It is cross compiled (from a timesys download). Configure options are (from config.log):
    $ ./configure --target=i686-ims-linux-gnu --host=i686-ims-linux-gnu --build=i686-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib --libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --includedir=/usr/include --disable-nls --disable-Werror ac_cv_lib_pcap_pcap_inject=yes ac_cv_func_malloc_0_nonnull=yes --disable-so-timestamping

    both daemons are run with the same arguments (only the priority changes)
    ptpd2 --clock:set_rtc_on_step=Y --ptpengine:interface=br0 --ptpengine:use_libpcap=y --ptpengine:preset=masterslave --ptpengine:priority1=10 --ptpengine:log_announce_interval=1 --ptpengine:log_sync_interval=0 --global:verbose_foreground=Y --ptpengine:ip_mode=hybrid --ptpengine:log_delayreq_interval=4 --global:enable_snmp=Y

    When I run strace on the ptpd2 command above I get a lot of
    select(14, [5 7 9 12 13], NULL, NULL, {13, 998142}) = 1 (in [13], left {13, 998133})
    recv(11, 0x80db720, 300, MSG_DONTWAIT) = -1 EAGAIN (Resource temporarily unavailable)

    which I thought was the problem that --disable-so-timestamping was supposed to fix.

    Also, things seem to work on the ARM processors we have that were cross compiled on the same machine ...

    HELP PLEASE!

     

    Last edit: Marc Potter 2017-01-08
  • Wojciech Owczarek

    Hi Marc,

    The 100% CPU issue looks similar to one that has been fixed in the current Github source - which is currently recommended. https://github.com/ptpd/ptpd - try that please. Not sure about libpcap - it is usually unaffected by host firewall. Try the github source and see if it makes a difference and report back.

     
  • Marc Potter

    Marc Potter - 2017-01-10

    Thanks, initial tests with 2.3.2 do seem to work. This is true with libpcap=y even though that is not mentioned in the Changes.
    Now if I just can get timesys to port it :)

     

Log in to post a comment.