[v2,0/1] Linux: Add epoll ioctls

Message ID 20240528173706.511391-1-jdamato@fastly.com
Headers
Series Linux: Add epoll ioctls |

Message

Joe Damato May 28, 2024, 5:37 p.m. UTC
  Greetings:

Welcome to v2.

Linux kernel 6.9 added support for two ioctls to get and set struct
epoll_params [1], which user programs can use to enable and control busy
polling of network sockets. This is done in Linux kernel commit
18e2bf0edf4dd ("eventpoll: Add epoll ioctl for epoll_params") [2] by
adding the ioctls and struct to the Linux kernel's
include/uapi/linux/eventpoll.h.

I also noticed that build-many-glibcs.py has been updated to use Linux
6.9 [3].

As such, I've updated the epoll.h header and added tst-epoll-ioctls.c to
test the ioctls. As you'll see, I've attempted to detect if ioctl is
supported in tst-epoll-ioctls.c before actually doing the test.

This is my first glibc contribution; please excuse me if I've made any
obvious mistakes with my submission.

Once this change is accepted, I plan on submitting a change to the
manpages to document this interface.

Thanks,
Joe

[1]: https://lore.kernel.org/netdev/20240213061652.6342-4-jdamato@fastly.com/T/
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/?h=v6.9&id=18e2bf0edf4dd
[3]: https://sourceware.org/pipermail/libc-alpha/2024-May/156684.html

v1 -> v2:
  - Updated cover letter to include links to the kernel commit and
    kernel commit SHA.
  - Fixed curly brace coding style issue in
    sysdeps/unix/sysv/linux/sys/epoll.h
  - Moved ioctl tests to their own test file which returns
    EXIT_UNSUPPORTED if the ioctl is not supported instead of using
    tst-epoll.

Joe Damato (1):
  Linux: Add epoll ioctls

 NEWS                                       |  3 +
 sysdeps/unix/sysv/linux/Makefile           |  1 +
 sysdeps/unix/sysv/linux/sys/epoll.h        | 14 ++++
 sysdeps/unix/sysv/linux/tst-epoll-ioctls.c | 92 ++++++++++++++++++++++
 4 files changed, 110 insertions(+)
 create mode 100644 sysdeps/unix/sysv/linux/tst-epoll-ioctls.c