From nobody Sat Jul 26 21:25:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bqHpN0BsMz62VGx; Sat, 26 Jul 2025 21:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHpM6dpcz3r6D; Sat, 26 Jul 2025 21:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTYeHzlqMf3W7Ocf2W2Rav3MHtZFF1oQeWnK3YxJ2iE=; b=j+JAcpoNvZ0TtXZzSd60rROcOTjqy9K/6UHEg5GqFUk594AzUtn5mdQZZwvWLitqoQ8lkd 8gp4VuuqOLtjMgofKyq4+rA81ZBLZT5juVvbGcZvIK9LPoiukVwT6zhhuWfEd6qTQPnn8Q VIrZgeLwuCQJunaiboqi/3UBUTgeXdXbZcXJMFvAseHXaqOLxWJ3BPYm0PeyWydF44O0lv LPW0FmDu49/giMalalkwLds24O/YM4MlJxofzJcDMedAYoYt22BlksFtAmwEzjFmUNmVyW VYXjpg0hKWtUNmZ2v6GGNm+Cef7K429E2Ossr8P/pe3yLrTCe5bZdz0mPpqP8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTYeHzlqMf3W7Ocf2W2Rav3MHtZFF1oQeWnK3YxJ2iE=; b=rrDOnSQWFADDVsv0Zo+02W6Sxudz7P/EHkZKGo5rLdGhkz0DJ0oELF2Cx28JnsRtT0kxpu yuJvdIU5TovNqp4hJVh3xQgYP5JeXQeG0J64gFxKBdg9aOldjKcHzR8cm+0DfAfWj0+uL8 xAIqjsGYgr4DUnCCPsTF9MDJSnUZyznlrYgJTr7WgIPECHLzKLWfxHurS2xeyUtF8/23/6 3DSghih9sPmTzeUAEUivhj4FWo/nqZADv+/OdqS8T9yNin4fh++K86G64b29XJmSgL7aAq VgvRFRkuXzGZ0zdMdYhI481b6g395CUBgnQNvhaom0YlnYzHUsVXJbZ8l1XzAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565131; a=rsa-sha256; cv=none; b=lx7TMllOhkXVmd3B8bPI6kuI28Iz5/KLDiY9By+LQXU7//keedy/6X5f2paao+Lxck3mGf mIIJQ4/yy8WF5WZEg686mVCA4CF0cGk+Je1frnDYeB9u+seHyGFiuBpK4gFx/tngPzL0Qy 5VqXoPjXbCqBjwtgi5uhE6RNwnpXKDU40yFmGguQJba+5lpRAnMgwZ1USxddHEm1prtfLW f1Jdv1007CHHx8kQtPfurpCF4HsVr4Pq8ISTg68rTuk4mk1xq4Pl63dCBkZl91YQveBxoA cckxObDQgDwul1U6DJDSBMG+GaqvyonAtLuu7h3KEZuMwrlvH6bWzKJEzMzomA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHpM6DcCzmvj; Sat, 26 Jul 2025 21:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLPVC0052025; Sat, 26 Jul 2025 21:25:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLPVfZ052022; Sat, 26 Jul 2025 21:25:31 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:25:31 GMT Message-Id: <202507262125.56QLPVfZ052022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 122b2a3530f8 - main - getsockopt.2: Add SO_SPLICE source socket read and socket close behavior List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 122b2a3530f8baab56d196b51724cc3ddd38abd2 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=122b2a3530f8baab56d196b51724cc3ddd38abd2 commit 122b2a3530f8baab56d196b51724cc3ddd38abd2 Author: Kevin Bowling AuthorDate: 2025-07-26 21:18:47 +0000 Commit: Kevin Bowling CommitDate: 2025-07-26 21:18:47 +0000 getsockopt.2: Add SO_SPLICE source socket read and socket close behavior Add select(2), poll(2), or kqueue(2) source socket semantics and close behavior. Reported by: Udip Pant Reviewed by: manpages (ziaee), markj Obtained from: OpenBSD MFC after: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D51547 --- lib/libsys/getsockopt.2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/libsys/getsockopt.2 b/lib/libsys/getsockopt.2 index 8839b61597a2..3867824681d7 100644 --- a/lib/libsys/getsockopt.2 +++ b/lib/libsys/getsockopt.2 @@ -593,6 +593,15 @@ specified amount of time has elapsed since the initial call to If .Fa sp_fd is -1, the socket will be unspliced immediately. +A successful +.Xr select 2 , +.Xr poll 2 , +or +.Xr kqueue 2 +operation testing the ability to read from the source socket indicates +that the splicing has terminated and at least one byte is available for +reading. +When one of the sockets gets closed, splicing ends. .Pp When passed to .Fn getsockopt ,