[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f7f9ef01-cd17-487a-ba07-0a11a70e51aa@linux.dev>
Date: Fri, 19 Sep 2025 12:04:10 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Jacob Keller <jacob.e.keller@...el.com>,
Florian Fainelli <florian.fainelli@...adcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@...adcom.com>, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>, Russell King
<linux@...linux.org.uk>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Kory Maincent <kory.maincent@...tlin.com>
Cc: Richard Cochran <richardcochran@...il.com>,
Yaroslav Kolomiiets <yrk@...a.com>, James Clark <jjc@...ark.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net 3/3] ptp: document behavior of PTP_STRICT_FLAGS
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@...el.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@...ux.dev>
Powered by blists - more mailing lists