Menu

#18 Make PCAP dependency optional

closed
None
5
2014-02-16
2013-10-07
Jan Breuer
No

LibPCAP is needed just for Ethernet transport. Someone can use it also in IP transport but it has no benefits now.

Some user also reported difficulties building against libpcap. This was caused because we don't use pcap-config to determine link time dependencies.

We can make it optional same as net-snmp.

Discussion

  • Wojciech Owczarek

    Agreed. This dependency is also an obstacle for people building ptpd on minimal platforms.

     
  • Inaqui Delgado

    Inaqui Delgado - 2014-01-15

    Attached is a patch against r462 of the trunk with pcap as an optional dependency. I also made a minor update to use absolute paths with --with-pcap-config and --with-net-snmp-config in configure.

    I tested with the following build and runtime configurations on Ubuntu 12.04 with libpcap installed, and RHEL 6.5 with and without libpcap installed.

    ./configure
    ./configure --disable-pcap (with libpcap installed)
    ./configure (without libpcap installed)

    ./ptpd2 (default ipv4)
    ./ptpd2 --ptpengine:use_libpcap=1 (ipv4 using libpcap)
    ./ptpd2 --ptpengine:ethernet (ethernet using libpcap)

    Please try it and let me know whether this can be applied to the trunk.

     
  • Wojciech Owczarek

    Looks good at first glance Iñaqui, I think we needed this. Let's see what others say.

    At the same time I retract my previous comment - on low latency 10G NICs the use of libpcap gives very good results vs. software timestamping. To my great surprise on Mellanox 10GE NICs on RHEL 6.5 I managed to remove nearly 10us of accuracy penalty resulting from TX vs. RX timestamp asymmetry normally introduced by looping the packets.

     
  • Wojciech Owczarek

    • status: open --> closed
    • assigned_to: Wojciech Owczarek
     
  • Wojciech Owczarek

    In svn already. Committed Inaqui's patch with some changes to the autoconf part:

    • ptpd will try to guess pcap flags if pcap-config not found. It's not present on all systems
    • ptpd will accept either pcap/pcap.h or pcap.h - original patch required both, whih didn't work on all platforms.
     

Log in to post a comment.

Monday.com Logo