From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id F1EBE29734 for ; Wed, 29 May 2024 15:16:56 +0200 (CEST) Received: (qmail 16380 invoked by uid 550); 29 May 2024 13:16:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 16335 invoked from network); 29 May 2024 13:16:52 -0000 Date: Wed, 29 May 2024 09:17:07 -0400 From: Rich Felker To: Joe Damato Cc: musl@lists.openwall.com Message-ID: <20240529131707.GI10433@brightrain.aerifal.cx> References: <20240529064959.1733708-1-jdamato@fastly.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240529064959.1733708-1-jdamato@fastly.com> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] sys/epoll.h: add epoll ioctls On Wed, May 29, 2024 at 06:49:59AM +0000, Joe Damato wrote: > add two ioctls to get and set struct epoll_params to allow users to > control epoll based busy polling of network sockets. > > added to uapi in commit 18e2bf0edf4dd88d9656ec92395aa47392e85b61 (Linux > kernel 6.9 and newer). > --- > include/sys/epoll.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/include/sys/epoll.h b/include/sys/epoll.h > index ac81a841..5f975c4a 100644 > --- a/include/sys/epoll.h > +++ b/include/sys/epoll.h > @@ -7,6 +7,7 @@ extern "C" { > > #include > #include > +#include > #include > > #define __NEED_sigset_t > @@ -54,6 +55,17 @@ __attribute__ ((__packed__)) > #endif > ; > > +struct epoll_params { > + uint32_t busy_poll_usecs; > + uint16_t busy_poll_budget; > + uint8_t prefer_busy_poll; > + > + uint8_t __pad; > +}; > + > +#define EPOLL_IOC_TYPE 0x8A > +#define EPIOCSPARAMS _IOW(EPOLL_IOC_TYPE, 0x01, struct epoll_params) > +#define EPIOCGPARAMS _IOR(EPOLL_IOC_TYPE, 0x02, struct epoll_params) > > int epoll_create(int); > int epoll_create1(int); > -- > 2.34.1 This is probably okay, but we should at least ask if sys/ioctl.h is going to be a namespace mess. Is the intent to bring all of it in, or just to get the EPIOC* macros which depend on _IOW and _IOR? On glibc, does it pull in sys/ioctl.h? Rich