Hello community,
I try using libpcap on Yocto + Apalis iMX6 and i get problem.
My goal is to get hardware timestamp with good precision. FEC driver is well done and seems able to produce a good timestamp precision. this is my code sample to fix pcap options :
int res1= pcap_set_tstamp_type(handle, PCAP_TSTAMP_ADAPTER_UNSYNCED);
int res2= pcap_set_tstamp_precision(handle, PCAP_TSTAMP_PRECISION_NANO);
But my problem is that when i use timestamp type PCAP_TSTAMP_ADAPTER_UNSYNCED are not good. Precision is not good.
Time stamping parameters for eth0 using ethtool:
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)
And to conclude, the same sample code is working well on Colibri iMX6!
BR
Fred