All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Sebastien Laveze <sebastien.laveze@oss.nxp.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	yangbo.lu@nxp.com, yannick.vignon@oss.nxp.com,
	rui.sousa@oss.nxp.com
Subject: Re: [PATCH net-next] ptp: add vclock timestamp conversion IOCTL
Date: Mon, 27 Sep 2021 13:23:04 -0700	[thread overview]
Message-ID: <20210927202304.GC11172@hoboy.vegasvil.org> (raw)
In-Reply-To: <b9397ec109ca1055af74bd8f20be8f64a7a1c961.camel@oss.nxp.com>

On Mon, Sep 27, 2021 at 06:00:08PM +0200, Sebastien Laveze wrote:
> The "typically" was more a reference to this possible implementation of
> AS-2020 using a common CMLDS layer and several domains using a single
> socket.
> 
> So, without this IOCTL the design would be 1 socket for CMLDS layer
> and 1 socket for each domain plus some specific filtering for each
> socket to avoid processing the unwanted traffic.
> 
> With this IOCTL, the design would be 1 socket and 1 conversion for the
> sync messages in the appropriate domain.

The ioctl solution is gross.  A program with eight vclocks should call
recvmsg and parse the CMSG, then go and call ioctl seven times?  Yuck.

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?

Thanks,
Richard

  reply	other threads:[~2021-09-27 20:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  9:32 [PATCH net-next] ptp: add vclock timestamp conversion IOCTL Sebastien Laveze
2021-09-27 14:59 ` Richard Cochran
2021-09-27 16:00   ` Sebastien Laveze
2021-09-27 20:23     ` Richard Cochran [this message]
2021-09-28 11:50       ` Sebastien Laveze
2021-09-28 13:31         ` Richard Cochran
2021-09-29 15:00           ` Sebastien Laveze
2021-09-30 14:35             ` Richard Cochran
2021-10-07 13:31               ` Sebastien Laveze
2021-10-07 20:19                 ` Richard Cochran
2021-10-08  7:13                   ` Sebastien Laveze
2021-10-09 18:24                     ` Richard Cochran
2021-10-09 18:25                       ` Richard Cochran
2021-10-11 12:58                     ` Richard Cochran
2021-10-12 16:14                       ` Richard Cochran
2021-10-13  9:56                       ` Sebastien Laveze
2021-10-13 13:10                         ` Richard Cochran
2021-10-13 13:28                           ` Sebastien Laveze
2021-10-13 17:54                             ` Richard Cochran
2021-10-14 13:27                               ` Sebastien Laveze
2021-09-27 18:28 ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210927202304.GC11172@hoboy.vegasvil.org \
    --to=richardcochran@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rui.sousa@oss.nxp.com \
    --cc=sebastien.laveze@oss.nxp.com \
    --cc=yangbo.lu@nxp.com \
    --cc=yannick.vignon@oss.nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.