Hi linuxptp community! Hope someone can give me an idea of what could be probably wrong with the following...
I'm trying to run ptp4l(v2.0) in a custom hardware(PWERPC e500) running a custom linux image( Linux version: 4.1.38 )with the following command: $ptp4l -m -i eth0 -f default.cfg -S The issue that we're facing is that when ptp4l call recvmsg() inside sk.c i'm getting just one of the two ancillary messages that i'm supposed to receive i.e. i'm only receiving cm_level SOL_IP with cm_type IP_RECVERR message within the function sk_receive() there is a routine that looks for the options received in a ancillary buffer i.e. for (cm = CMSG_FIRSTHDR(&msg); cm != NULL; cm = CMSG_NXTHDR(&msg, cm)) { ... } And i can verify that it is doing this just once and is in fact, the RECVERR message with the ee_errno field equals to ENOMSG so according to section 2.1.1 in [1] i'm missing cm_level SOL_SOCKET and cm_type SCM_TIMESTAMPING message and because of this ptp4l shows the following log: ----------------------------------------------------------------------------------------------------------- #[/root]:ptp4l -m -i eth0 -f default.cfg -S ptp4l[273.015]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[273.015]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE ptp4l[280.672]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[280.672]: selected local clock 00302f.fffe.023379 as best master ptp4l[280.672]: assuming the grand master role ptp4l[281.677]: missing timestamp on transmitted sync <<<<---------! ptp4l[281.677]: port 1: MASTER to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED) ptp4l[297.678]: port 1: FAULTY to LISTENING on INIT_COMPLETE ptp4l[304.170]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ----------------------------------------------------------------------------------------------------------- ethtool -T eth0 shows the following: ----------------------------------------------------------------------------------------------------------- Time stamping parameters for eth0: 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) one-step-sync (HWTSTAMP_TX_ONESTEP_SYNC) Hardware Receive Filter Modes: none (HWTSTAMP_FILTER_NONE) all (HWTSTAMP_FILTER_ALL) ----------------------------------------------------------------------------------------------------------- Linux Config file includes ----------------------------------------------------------------------------------------------------------- - CONFIG_PPS - CONFIG_NETWORK_PHY_TIMESTAMPING - PTP_1588_CLOCKPTP ----------------------------------------------------------------------------------------------------------- Following the skb_tstamp_tx() i can see when sk_error_queue is filled with ENOMSG but where does the second message(cm_level SOL_SOCKET and cm_type SCM_TIMESTAMPING) comes from? Please let me know how to debug this issue; what information i can provide in order to give a better context of what is happening? at which level i can confirm(i.e. print) that socket's error_queue was filled properly? does this seems to be the real cause of the problem or should i look another path? Thank you very much for your support! [1] https://www.kernel.org/doc/Documentation/networking/timestamping.txt
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users