Re: [Patch net-next v3 08/13] net: dsa: microchip: ptp: add packet transmission timestamping

Vladimir Oltean
2022-12-09T15:08:17Z

On Fri, Dec 09, 2022 at 12:54:32PM +0530, Arun Ramadoss wrote:
> From: Christian Eggers <ceggers@arri.de>
>
> This patch adds the routines for transmission of ptp packets. When the
> ptp pdelay_req packet to be transmitted, it uses the deferred xmit
> worker to schedule the packets.
> During irq_setup, interrupt for Sync, Pdelay_req and Pdelay_rsp are
> enabled. So interrupt is triggered for all three packets. But for
> p2p1step, we require only time stamp of Pdelay_req packet. Hence to
> avoid posting of the completion from ISR routine for Sync and
> Pdelay_resp packets, ts_en flag is introduced. This controls which
> packets need to processed for timestamp.
> After the packet is transmitted, ISR is triggered. The time at which
> packet transmitted is recorded to separate register.
> This value is reconstructed to absolute time and posted to the user
> application through socket error queue.
>
> Signed-off-by: Christian Eggers <ceggers@arri.de>
> Co-developed-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> ---

Reviewed-by: Vladimir Oltean <olteanv@gmail.com>