[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZRijM9YfyCmrXG7m@hoboy.vegasvil.org>
Date: Sat, 30 Sep 2023 15:37:39 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Xabier Marquiegui <reibax@...il.com>
Cc: netdev@...r.kernel.org, horms@...nel.org,
chrony-dev@...ony.tuxfamily.org, mlichvar@...hat.com,
ntp-lists@...tcorallo.com, vinicius.gomes@...el.com,
alex.maftei@....com, davem@...emloft.net, rrameshbabu@...dia.com,
shuah@...nel.org
Subject: Re: [PATCH net-next v3 3/3] ptp: support event queue reader channel
masks
On Thu, Sep 28, 2023 at 03:35:44PM +0200, Xabier Marquiegui wrote:
> diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h
> index 05cc35fc94ac..6bbf11dc4a05 100644
> --- a/include/uapi/linux/ptp_clock.h
> +++ b/include/uapi/linux/ptp_clock.h
> @@ -105,6 +105,15 @@ struct ptp_extts_request {
> unsigned int rsv[2]; /* Reserved for future use. */
> };
>
> +struct ptp_tsfilter {
> + union {
> + unsigned int reader_rpid; /* PID of device user */
> + unsigned int ndevusers; /* Device user count */
> + };
> + int reader_oid; /* Object ID of the timestamp event queue */
> + unsigned int mask; /* Channel mask. LSB = channel 0 */
> +};
This is WAY too complicated.
Just let the user pass a bit mask (say 32 x uint64_t = 2048 channels)
of what they want to receive.
OR:
- ioctl to clear mask
- ioctl to set one channel in mask
After opening the character device, the default is that the user will
receive events from all channels. This is an established API, and you
cannot change it. If the user is only interested in specific
channels, then they can set the mask after calling open().
Thanks,
Richard
Powered by blists - more mailing lists