From patchwork Tue May 28 17:37:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Damato X-Patchwork-Id: 57028 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 589C4386C5B7 for ; Tue, 28 May 2024 17:37:49 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 30296385B52B for ; Tue, 28 May 2024 17:37:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 30296385B52B Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=fastly.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fastly.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 30296385B52B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716917843; cv=none; b=lt+UqRLjUd9cVT0HtcuFHh8HYA0AyEufdAakRZ1ohgZMvByR24muA5nsJ1Z3fKg5LpHKlxiaTtAjiuXjTTRdtXTueBjcv6d5wBxEdekvAXMqvlfMJdMWQc8/JytSUN9HubH2y6N/aa0BUsKos1RmkYNlk0/0ONUuYSz4EcJ94vU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716917843; c=relaxed/simple; bh=ag6KhLzuI6NTK2i0LV7Ud5BQWBdfE6JB68hWNiegx2w=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=MdCv2ZxooTcHrtdEsqW1yS3lH7jWJ1xDjGPd7e2sxEARZPew2Ok5SeTnu/K1vcRcTNzS8XKICZvNtTZM7/uah/P34WdgVO1WFb4S0uu4XhKaVLI+JS/dxvhAvfWfTHL6dlwniqD/aughSkNtXog017Y0sNSc8Q8QkrYMJuQdeaQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1f4c7b022f8so9476295ad.1 for ; Tue, 28 May 2024 10:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastly.com; s=google; t=1716917840; x=1717522640; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XWCoFUy08Aj3pfi/IfKAujE83AD5zoVUup1xhhQVnEw=; b=tf2i3AAXbk2EoXySi4el3xd5Wh76FAB11X8FP+TLzWBwJp19cy8Qm5u2/eeg8mqZVO yuRRwXsmjHXUHViiGIfQwero/19BhjowCiMHvXG9sfwznaXbz1KGcw2MVlPnJE04oZE5 0GAEJ6U4pIfc11la9VVSI/EamFlz9FW57iY3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716917840; x=1717522640; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XWCoFUy08Aj3pfi/IfKAujE83AD5zoVUup1xhhQVnEw=; b=ifwW1L09JsMTRLjl9hiFHzR05W6DKzQ20+v668rWkQv89NL0H76o9lBQQOJeCGmJy0 T3sHa9PlWXDG3EJC5ouFT6YN0croXI7ZgOPV55LChxBAkhkip1D+Gx+P3ELLB5kBLcmV GUXSbd7U4mMnPicnU3fe3MSpJ16pyCnF8rAZ2MdrOc2TEFHx+jb6CCKAHYoiXovdG7kE kR2fB7DEnpTzWcE9xTqof8nTEWoOJ/XHEj43x9T8Rmg/mRM8lncpGnrbiVdMlhr/X7Bm OYlCrzgD3Bx1bPFRYECxKRaY1IxmI6T3jf9eRHaVxlUbz+Y7IfCelHpkaM6ZSEYVTmBo 4ZqQ== X-Gm-Message-State: AOJu0YwNK2chOu9WpC703K4ikCUiEI01yJpgXIXWtCMGhwZih7g6rSXi AP8PptWyJerFFPb7bTWPI37O3lsOYHDmBUL9Mxs1BUKsjJbN09IsH11z5CB2SFKRdrxCmIuqiVU 3RcBAIytX5E+XHKOEKyAE7pXDPMyWsTK5RIX8Vv4VOhnKVHbI8uhCRAG8LSAYBptVW2E7jJGxTv Im9t8TL7sgSsdmtcg06skCMVuZF8Mk23904duZ3E8= X-Google-Smtp-Source: AGHT+IE5Y0FQnc3miE9VC0bS4InyiPXCIIBChscnHaVqeYbPibE+sD34hrD2tGwanQ+kEs8e6MliFA== X-Received: by 2002:a17:903:120b:b0:1f3:695:eeda with SMTP id d9443c01a7336-1f4498fa6fcmr151103045ad.61.1716917839374; Tue, 28 May 2024 10:37:19 -0700 (PDT) Received: from localhost.localdomain ([2620:11a:c019:0:65e:3115:2f58:c5fd]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f44c9a8db7sm83101935ad.222.2024.05.28.10.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 10:37:18 -0700 (PDT) From: Joe Damato To: libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, Joe Damato Subject: [PATCH v2 0/1] Linux: Add epoll ioctls Date: Tue, 28 May 2024 17:37:05 +0000 Message-Id: <20240528173706.511391-1-jdamato@fastly.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org 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