Re: [RFC PATCH] net: macb: Process tx timestamp only on ptp packets
From: Harini Katakam
Date: Tue Aug 24 2021 - 11:29:39 EST
Hi Richard,
On Tue, Aug 24, 2021 at 7:35 PM Richard Cochran
<richardcochran@xxxxxxxxx> wrote:
>
> On Tue, Aug 24, 2021 at 03:42:38PM +0530, Harini Katakam wrote:
> > The current implementation timestamps all packets and also processes
> > the BD timestamp for the same. While it is true that HWTSTAMP_TX_ON
> > enables timestamps for outgoing packets, the sender of the packet
> > i.e. linuxptp enables timestamp for PTP or PTP event packets. Cadence
> > GEM IP has a provision to enable this in HW only for PTP packets.
> > Enable this option in DMA BD settings register to decrease overhead.
>
> NAK, because the HWTSTAMP_TX_ON means to time stamp any frame marked
> by user space, not just PTP frames.
>
> This patch does not "decrease overhead" because the code tests whether
> time stamping was request per packet:
>
Thanks for the review.
Yes, there is no SW overhead because the skb check ensures timestamp
post processing is done only on requested packets. But the IP
timestamps all packets
because this is a register level setting, not per packet. That's the
overhead I was referring to.
But based on your explanation, it looks like we have no option but to enable
TSTAMP_ALL_FRAMES. Thanks.
Regards,
Harini