On 2022-01-13 05:11, Richard Cochran wrote:
On Wed, Jan 12, 2022 at 03:57:55PM +0100, Peter Bergin wrote:

I have a setup with TI processor using the cpsw driver from Linux mainline,
kernel version 5.4. I'm using IEEE 802.3 network transport and sending PTP
frames on Ethernet. When sending SYNC, FOLLOW_UP and DELAY_REQ that has a
length of 58 bytes they get padded up to 64 bytes.
I tried layer2 with a Beagle Board Black (am335x), and I also saw the
SIX bytes of padding.  Wireshark hates this, and shows a FCS error
(but actually I think it assumes the last 4 bytes are FCS, but in fact
the FCS has been stripped by the MAX)

As Miroslav pointed out, padding SIX bytes is wrong.

On the other side in my setup I have a PC with e1000e driver. On that side
when sending SYNC, FOLLOW_UP and DELAY_REQ over Ethernet the PDUs are padded
to 60 bytes.
This is correct.

     44 (PTP PDU) + 14 (L2 dst+src+type) + 4 (FCS) = 62 bytes

Two bytes padding are needed to make 64 bytes.  Not SIX bytes.

The TI MAC (or driver?) is padding six bytes instead of two.

Somebody should tell TI about their bug.

Thanks for the confirmation Richard! I did some more research around this and it turned out is was already fixed in v5.14 upstream. For reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=acc68b8d2a1196c4db806947606f162dbeed2274

Backporting relevant stuff of this patch to my 5.4 kernel solved the padding problem.

/Peter




_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to