> -----Original Message-----
> From: Richard Cochran <richardcoch...@gmail.com>
> Sent: Tuesday, January 25, 2022 6:10 PM
> To: Dale Smith <dalepsm...@gmail.com>
> Cc: linuxptp-devel@lists.sourceforge.net
> Subject: Re: [Linuxptp-devel] [PATCH] Add PORT_SERVICE_STATS_NP
> management TLV
>
> On Tue, Jan 25, 2022 at 05:04:44PM -0500, Dale Smith wrote:
> > I don't see a way to reset/clear these counters. Should there be? It
> > will take a while to overflow 64 bits, so it probably isn't needed?
>
> Q: If you have one missing Announce per second, when will it overflow?
>
> A: 2^64 = 18446744073709551616 s
> = 5124095576030431 h
> = 213503982334601 d
> = 584542046090.6 y
> = 5845420460.9 c
>
> (but I neglected the possible future leap seconds ;^)
>
> So it never overflows, practically speaking.
>
Even with a *significantly higher* loss of messages for the drops per second it
won't overflow any time soon. And that amount of drops is unreasonable given
the message rate of PTP.
> Applications can simply latch the current value and subtract it from
> subsequent reads in order to "reset" the counter.
>
It wouldn't hurt to have this hint documented, since I know I might not have
thought to do that :)
> Thanks,
> Richard
>
>
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel