Re: [PATCH net] net: ethernet: ti: am65-cpts: keep port and direction when matching PTPv1 TX timestamps

From: Jesper Lyager Nielsen

Date: Mon Nov 02 2026 - 08:38:26 EST


Hi Siddharth,

Thanks for looking at this.

On 10/30/26 ..., Siddharth Vadapalli wrote:
>> For PTPv1 this defeats
>> commit a23c657e332f ("net: ethernet: ti: am65-cpsw: Use also port number to identify timestamps").
>
> nitpick: This could be wrapped as done for the previous instance above.

Will do in v2.

>> With a PTPv1 master on both ports
>> whose sequence ids run in step (e.g. a Dante device with primary and
>
> Does this mean there are two PTP grandmasters? Is CPSW configured in EMAC
> mode or Switch mode? Is the PTP application bound to both network
> interfaces?

CPSW is in multi-port MAC (EMAC) mode: eth0 and eth1 are separate
interfaces with their own addresses on two physically separate networks,
there is no bridge between them.

This is Dante network redundancy. The audio device is connected to a
primary network (eth1) and a completely separate secondary network
(eth0), and every Dante device sends the same audio on both. There is a
single PTP application (Audinate's PTPv1 daemon), one process bound to
both interfaces, using hardware timestamps on both.

So there is one clock, the CPTS, and one PTP instance. When that device
is elected leader, it is the master on each of the two networks, with
each port sending Sync/Follow_Up into its own network, both timestamped
by the same CPTS. Each network has exactly one master; it is the same
device and the same time base on both, much like a boundary clock or
ptp4l with two ports sharing one PHC.

The daemon keeps a sequence counter per port. When both ports start at
the same time, the counters run in step, so Sync N leaves on eth0 and
eth1 within microseconds of each other. That is when the same-seqid
event of the other port can be matched.

> nitpick: Unlike other subsystems, comments in netdev do not have an empty
> line at the start.

Will fix in v2. I'll wait for your review of the code before sending it.

Thanks,
Jesper