Hi, > Just some minor coding style issues. Please order the declarations by length > (reverse christmas tree) and write hdr as "*hdr" instead of > "* hdr".
Thanks for pointing out the coding style, will fix it. > > Is it necessary to return the padding length here? If I understand it > correctly > it's not specific to PRP. It's just the original Ethernet minimum length of 64 > plus 6 bytes for the trailer. If you remove the padding_len variable, the > function can be simplified a bit. > In my testing I haven't noticed any issues if I only remove the actual PRP trailer (and not padding), but it might because the padding is 00 bytes. For example, a PTP SYNC message is 44bytes long, with normal eth header (no vlan) being 14bytes it ends up being padded with 6 bytes (followed by PRP trailer). If I only remove the PRP trailer (6 bytes) but leave the padding length in `cnt`, then if I follow the code correctly the message should end up in msg.c:425 and still have 6 (padding)bytes to process. To my understand it should try to parse TLV, and then return a suffix_len of 4 (successfully taken 1 TLV and failed to take the 2nd) which should fail the check on msg.c:429. This is just from reading the code, might be that I am missing something. BR, Magnus Armholt _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel