From nobody Fri Nov 14 15:22:07 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1762456910; cv=none; d=zohomail.com; s=zohoarc; b=eOKa2U2wmTKxSoOWd43oR29DjTXt30oR3hB21XRDnxkpisihRIXmuYFrZgxKbAgvrrmPxsUszOO0zPoRUQoeFk5fxF4VXMtb7NvHuMZafVMhzbSPmNnlipmeUtfX4FEOM7hwWV+bFwq/gxn56mFIovwZWJfbzXAY08rdqXe0qd4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762456910; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UbXNd4Ht3LrkAFOizDjyRSsbi+eC2VASAyLRUbb+nPg=; b=DsNzGsM8He/7CYPp3x2fiPrJ8RZ1G1zEPvX3aL5rDyFawARQHbN6gaB1uG67rHGjIuFWNu1uRfDj7SAe912W3gUW1s4KComDQuRY0Dnn0Xz6P/xYO7kIhhprEcNsWCBOkhTiZwqReu0LEI98SXiH48fYs2vgs5Xhkj74Gi45DVs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1762456910425901.7503660021756; Thu, 6 Nov 2025 11:21:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vH5Xw-0007kt-Rj; Thu, 06 Nov 2025 14:21:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vH5Xu-0007kh-Dx for qemu-devel@nongnu.org; Thu, 06 Nov 2025 14:21:22 -0500 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vH5Xs-0004jM-Jk for qemu-devel@nongnu.org; Thu, 06 Nov 2025 14:21:22 -0500 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id AB5CF7A0070; Thu, 6 Nov 2025 14:21:17 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 06 Nov 2025 14:21:17 -0500 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Nov 2025 14:21:16 -0500 (EST) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 268BA68079E9; Thu, 06 Nov 2025 20:21:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm2; t=1762456877; x=1762543277; bh=UbXNd4Ht3LrkAFOizDjyR Ssbi+eC2VASAyLRUbb+nPg=; b=X4EQZWhpJjeTJc8OJmp93LPRi8KpGr6Qe+v0J BlgTLMrlFswW0CYDMYHBk1MeAYRnFTpGQ8LlUO5g3Fr8YptC9CAgcHSoYr0MKd3X vbRECjivXn6W/Rr1i1NyNFxAWZT6mrd8lUR2tbu1/AUB9vaMdH4O0qntT99zttuq hJElhT8skKVbkuB0KWw5aQhUnrhNQGEhr0mZoB1qkLuH/5MZr/Pxzw3z+YbWZUuK arf/krex3QRUSmXtcG/Nsq7PoNDmL45h09hGJf3WCt8x0pn9lOyzXSbhGempLc6A ESpER0ToM254B/9ovdNf+jfaxFOTtMp/NDSZN6VySvSpnDXAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1762456877; x=1762543277; bh=UbXNd4Ht3LrkAFOizDjyRSsbi+eC2VASAyL RUbb+nPg=; b=aX9hkIB2vaDAXENbgeOqkLMxNaO8pd3ps/hYa0xTtFAEn/dMrqE 5m0xmN3V/3FAvjI/6m9S9N0c/OoGFKstcRCgtfi+46EyxO+2adPfk3QBqKCdPGFp FgyROeGK9hAbCTx61wzBENmlGEZWeMOc7Y6/XAvh5hHckdBxl0mwiPG9Kd/6TWmG Ku2eyqJW3kR/u0uyAL5ZRgqwx63ol6KIld5uJSsX3Vzuu0W4McIRxBHEoEfPcWk7 ybJK/e5t89I78q7uuid1+DJmToORrCmVL8JWRP48Hj0kJPqRgqz433KXE8/y5qml KiXty9rur5FJkbuxtubsNbuUPQnbKftLnjg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddukeejieduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomheptehlhihsshgrucft ohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepheekgfdtve ettdekuddugeeugfdujeehuefgleegtedthfffudfhheduhfduuefhnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrih hspdhnsggprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeih uhhrvghkrgestgihsggvrhgthhgrohhsrdguvghvpdhrtghpthhtohepqhgvmhhuqdguvg hvvghlsehnohhnghhnuhdrohhrghdprhgtphhtthhopehmshhtsehrvgguhhgrthdrtgho mhdprhgtphhtthhopehsghgrrhiirghrvgesrhgvughhrghtrdgtohhm X-ME-Proxy: Feedback-ID: i12284293:Fastmail From: Alyssa Ross To: qemu-devel@nongnu.org Cc: Yureka Lilian , "Michael S. Tsirkin" , Stefano Garzarella Subject: [PATCH] vhost-user.rst: clarify when FDs can be sent Date: Thu, 6 Nov 2025 20:21:05 +0100 Message-ID: <20251106192105.3456755-1-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=202.12.124.155; envelope-from=hi@alyssa.is; helo=fhigh-b4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @alyssa.is) X-ZM-MESSAGEID: 1762456913743158500 Content-Type: text/plain; charset="utf-8" Previously the spec did not say where in a message the FDs should be sent. As I understand it, FDs transferred in ancilliary data will always be received along with the first byte of the data they were sent with, so we should define which byte that is. Going by both libvhost-user in QEMU and the rust-vmm crate, that byte is the first byte of the message header. This is important to specify because it would make back-end implementation significantly more complicated if receiving file descriptors in the middle of a message had to be handled. Signed-off-by: Alyssa Ross --- docs/interop/vhost-user.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 2e50f2ddfa..93a9c8df2b 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -411,6 +411,13 @@ in the ancillary data: * ``VHOST_USER_SET_INFLIGHT_FD`` (if ``VHOST_USER_PROTOCOL_F_INFLIGHT_SHMF= D``) * ``VHOST_USER_SET_DEVICE_STATE_FD`` =20 +When sending file descriptors in ancilliary data, *front-end* should +associate the ancilliary data with a ``sendmsg`` operation (or +equivalent) that sends bytes starting with the first byte of the +message header. *back-end* can therefore expect that file descriptors +will only be received in the first ``recvmsg`` operation for a message +header. + If *front-end* is unable to send the full message or receives a wrong reply it will close the connection. An optional reconnection mechanism can be implemented. base-commit: 917ac07f9aef579b9538a81d45f45850aba42906 --=20 2.51.0