From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Jacob Keller <jacob.e.keller@intel.com>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Kory Maincent <kory.maincent@bootlin.com>
Cc: Richard Cochran <richardcochran@gmail.com>,
Yaroslav Kolomiiets <yrk@meta.com>, James Clark <jjc@jclark.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 3/3] ptp: document behavior of PTP_STRICT_FLAGS
Date: Fri, 19 Sep 2025 12:04:10 +0100 [thread overview]
Message-ID: <f7f9ef01-cd17-487a-ba07-0a11a70e51aa@linux.dev> (raw)
In-Reply-To: <20250918-jk-fix-bcm-phy-supported-flags-v1-3-747b60407c9c@intel.com>
On 19/09/2025 01:33, Jacob Keller wrote:
> Commit 6138e687c7b6 ("ptp: Introduce strict checking of external time stamp
> options.") added the PTP_STRICT_FLAGS to the set of flags supported for the
> external timestamp request ioctl.
>
> It is only supported by PTP_EXTTS_REQUEST2, as it was introduced the
> introduction of the new ioctls. Further, the kernel has always set this
> flag for PTP_EXTTS_REQUEST2 regardless of whether or not the user requested
> the behavior.
>
> This effectively means that the flag is not useful for userspace. If the
> user issues a PTP_EXTTS_REQUEST ioctl, the flag is ignored due to not being
> supported on the old ioctl. If the user issues a PTP_EXTTS_REQUEST2 ioctl,
> the flag will be set by the kernel regardless of whether the user set the
> flag in their structure.
>
> Add a comment documenting this behavior in the uAPI header file.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
> include/uapi/linux/ptp_clock.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h
> index 18eefa6d93d6..2c3346e91dbe 100644
> --- a/include/uapi/linux/ptp_clock.h
> +++ b/include/uapi/linux/ptp_clock.h
> @@ -37,6 +37,9 @@
>
> /*
> * flag fields valid for the new PTP_EXTTS_REQUEST2 ioctl.
> + *
> + * Note: PTP_STRICT_FLAGS is always enabled by the kernel for
> + * PTP_EXTTS_REQUEST2 regardless of whether it is set by userspace.
> */
> #define PTP_EXTTS_VALID_FLAGS (PTP_ENABLE_FEATURE | \
> PTP_RISING_EDGE | \
>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
next prev parent reply other threads:[~2025-09-19 11:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 0:33 [PATCH net 0/3] broadcom: report the supported flags for ancillary features Jacob Keller
2025-09-19 0:33 ` [PATCH net 1/3] broadcom: fix support for PTP_PEROUT_DUTY_CYCLE Jacob Keller
2025-09-19 11:02 ` Vadim Fedorenko
2025-09-19 0:33 ` [PATCH net 2/3] broadcom: fix support for PTP_EXTTS_REQUEST2 ioctl Jacob Keller
2025-09-19 11:03 ` Vadim Fedorenko
2025-09-19 0:33 ` [PATCH net 3/3] ptp: document behavior of PTP_STRICT_FLAGS Jacob Keller
2025-09-19 11:04 ` Vadim Fedorenko [this message]
2025-09-19 2:56 ` [PATCH net 0/3] broadcom: report the supported flags for ancillary features Richard Cochran
2025-09-19 8:39 ` Kory Maincent
2025-09-20 0:04 ` Jakub Kicinski
2025-09-21 1:26 ` James Clark
2025-09-22 19:30 ` patchwork-bot+netdevbpf
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=f7f9ef01-cd17-487a-ba07-0a11a70e51aa@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=jacob.e.keller@intel.com \
--cc=jjc@jclark.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=yrk@meta.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;
as well as URLs for NNTP newsgroup(s).