mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Joe Damato <jdamato@fastly.com>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [PATCH] sys/epoll.h: add epoll ioctls
Date: Wed, 29 May 2024 09:17:07 -0400	[thread overview]
Message-ID: <20240529131707.GI10433@brightrain.aerifal.cx> (raw)
In-Reply-To: <20240529064959.1733708-1-jdamato@fastly.com>

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 <stdint.h>
>  #include <sys/types.h>
> +#include <sys/ioctl.h>
>  #include <fcntl.h>
>  
>  #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

  reply	other threads:[~2024-05-29 13:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29  6:49 Joe Damato
2024-05-29 13:17 ` Rich Felker [this message]
2024-05-29 15:11   ` Joe Damato
2024-06-02 23:05     ` Joe Damato
2024-06-10 16:05       ` Rich Felker
2024-06-10 17:15         ` Joe Damato
2024-06-12 17:10           ` Joe Damato
2024-06-18 17:15             ` Joe Damato

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=20240529131707.GI10433@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=jdamato@fastly.com \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).