[Linuxptp-users] ptp4l over ethernet failed
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Raymond G. <ray...@ya...> - 2013-10-27 13:28:00
|
Hi, We are trying to run ptp4l (linuxptp-1.3) over ethernet (the -2 option). On the slave side, we use the command: "./ptp4l -H -2 -H -i eth0 -s -l 7 -m -q -p /dev/ptp0". However because of some "bad message" errors (see below), the slave side is not working. ptp4l[63896.503]: PI servo: sync interval 1.000 kp 0.100 ki 0.001000 ptp4l[63896.503]: port 1: get_ts_info not supported ptp4l[63896.600]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[63896.600]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[63897.324]: port 1: setting asCapable ptp4l[63897.324]: port 1: new foreign master 080028.fffe.329976-1 ptp4l[63897.526]: port 1: bad message We notice that the "bad message" is caused by the slave side receiving frames that includes the FCS. This FCS is treated as TLV, for example in a follow_up message from host side, in the suffix processing function suffix_post_recv. We experimented by letting ptp4l ignore the last 4 bytes of FCS in the messages received, then it works fine. I cannot find any reference that says the linux kernel or the hardware or the ethernet driver is not supposed to pass up the FCS to apps when communicating over raw sockets. Is this an issue lying in the kernel, ethernet driver or hardware which is not supposed to deliver the FCS? Otherwise is ptp4l supposed to properly handle the FCS (such as ignoring the last 4 bytes), or setting a socket option (if one exists) to kernel to ask it to discard the FCS before delivering to user space? Any suggestion will be appreciated. Thanks Raymond |