Re: [PATCH net-next] ptp: add vclock timestamp conversion IOCTL

From: Sebastien Laveze
Date: Tue Sep 28 2021 - 07:51:04 EST


On Mon, 2021-09-27 at 13:23 -0700, Richard Cochran wrote:
> What you really want is the socket to return more than one time stamp.
> So why not do that instead?
>
> Right now, the SO_TIMESTAMPING has an array of
>
> struct timespec ts[3] =
> [0] SOFTWARE
> [1] LEGACY (unused)
> [2] HARDWARE
>
> You can extend that to have
>
> [0] SOFTWARE
> [1] LEGACY (unused)
> [2] HARDWARE (vclock 0)
> [3] HARDWARE (vclock 1)
> [4] HARDWARE (vclock 2)
> ...
> [N] HARDWARE (vclock N-2)
>
> You could store the selected vclocks in a bit mask associated with the socket.
>
> Hm?

Yes that would do it. Only drawback is that ALL rx and tx timestamps
are converted to the N domains instead of a few as needed.

Before going in this direction, is this a change that you really see as
worthwile for virtual clocks and timetamping support ?

What approach do you have in mind for multi-domain support with the
common CMLDS layer ?

Thanks,
Seb