mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Min Li <min.li.xe@renesas.com>
To: Richard Cochran <richardcochran@gmail.com>, Min Li <lnimi@hotmail.com>
Cc: "lee@kernel.org" <lee@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH net-next v3 1/2] ptp: introduce PTP_CLOCK_EXTOFF event for the measured external offset
Date: Thu, 14 Dec 2023 21:59:32 +0000	[thread overview]
Message-ID: <OS3PR01MB65938570774AF540C6BFD8F5BA8CA@OS3PR01MB6593.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <ZXtLvOfS0uYxESQm@hoboy.vegasvil.org>


> On Thu, Dec 14, 2023 at 11:36:24AM -0500, Min Li wrote:
> > diff --git a/include/uapi/linux/ptp_clock.h
> > b/include/uapi/linux/ptp_clock.h index da700999c..66f4dd73a 100644
> > --- a/include/uapi/linux/ptp_clock.h
> > +++ b/include/uapi/linux/ptp_clock.h
> > @@ -32,6 +32,7 @@
> >  #define PTP_RISING_EDGE    (1<<1)
> >  #define PTP_FALLING_EDGE   (1<<2)
> >  #define PTP_STRICT_FLAGS   (1<<3)
> > +#define PTP_EXT_OFFSET     (1<<4)
> 
> This isn't going to work.
> 
> If user space enables time stamps twice, once with PTP_EXT_OFFSET and
> once without, it won't be able to differentiate the two when it reads a
> ptp_extts_event.
> 
> Thanks,
> Richard

Hi Richard
Would it be Ok if I use the flags to differentiate extts events from extoff?

 struct ptp_extts_event {
-       struct ptp_clock_time t; /* Time event occured. */
+       union {
+               struct ptp_clock_time t; /* Time event occurred. */
+               __s64 offset_ns;         /* Offset event occurred. */
+       };
         unsigned int index;      /* Which channel produced the event. */
         unsigned int flags;      /* Reserved for future use. */
         unsigned int rsv[2];     /* Reserved for future use. */

  reply	other threads:[~2023-12-14 21:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 16:36 Min Li
2023-12-14 18:38 ` Richard Cochran
2023-12-14 21:59   ` Min Li [this message]
2023-12-15 14:46     ` Richard Cochran

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=OS3PR01MB65938570774AF540C6BFD8F5BA8CA@OS3PR01MB6593.jpnprd01.prod.outlook.com \
    --to=min.li.xe@renesas.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lnimi@hotmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®