Hi,
We are running the old version 1.6. 1. This is a normal FOLLOW-UP received with one-zero padding of 6 octets. 2. sk.c this line returns 64, including eth header size 14. cnt = recvmsg(fd, &msg, flags); 3. msg.c, cnt is 50, pdulen 44. m->tlv_count = suffix_post_recv(suffix, cnt - pdulen, &m->last_tlv); 4. msg.c, this func takes 0x80 from above padding as tlv->length and returns below EBADMSG. static int suffix_post_recv(uint8_t *ptr, int len, struct tlv_extra *last) { if (tlv->length > len) { return -EBADMSG; } 5. It seems that eth standard doesnt say padding must be 0. So it could be a bug of ptp4l? or has been fixed by later release? Thanks, Vincent
--- Begin Message ---On Mon, Feb 19, 2018 at 05:59:23PM +0200, Yan Yankovskyi wrote: > It seems now that VLAN driver isn't actually used in the system, and we use > a custom ethernet driver. This driver has skb_tx_timestamp(skb); call in > it's start_xmit() routine, and I implemented and registered get_ts_info() > function for ethtool. The interface now successfully passes ethtool check, > and as far as I understand there are timestamps in ethernet frames. The > only messages that don't contain timestamps are Announce messages, I guess > it is not important? Right. Those are not event messages and don't get a time stamp. > But I still got the problem: in suffix_post_recv() function call for Sync > messages (cnt = 50, pdulen = 44) I'm getting wrong tlv values (always 0 for > type, but some arbitrary values for length, e.g. 50666, 18066). Do you have > any idea what may go wrong? I don't understand is it some problems in our > driver, or in ptp4l. It is in your driver. Sync messages never have TLVs attached. Probably the packet length is too long. HTH, Richard ---------------------------------------------------------------------------- -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel
--- End Message ---
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel