From nobody Thu Nov 13 14:57:01 2025 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; 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; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1582568775; cv=none; d=zohomail.com; s=zohoarc; b=eACOIGl5P3y7tqLGLjGzz46YHCiM71qHZ7cX9hKOBHMTYz2mn4bPdGhWlFrAFyhbS74uOaphBxCIuQ+EnAL9w/c5uQC1gHKHU67qAsNrh4Wf0/1ZHbQw3D2kZCJ61+dcqQG5LOH7+sKdjY49U2vynCzBu1h7/3BSwmV7ryhF1Zk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582568775; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=2cvQ3FYrPzC5NyFGbzOdzc56ApmSRxmqiRjX8HDYmYk=; b=nn5qca5nZ7qSv/j5HAK2iFrIFO6vX1gPBQ7jK4ZTQs1owuj21RyUU3OaYqRXHvPbiJy3Wr9J0mvUNlTQuFQQZSflnIVBTDnwRgx2JzjwfPol1+ViA6kssMAYj30ztNin+aVU3GoFmplKrucDzAAubCiAjJXj728f1i+C4SKlJss= ARC-Authentication-Results: i=1; mx.zohomail.com; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582568775450928.261503979684; Mon, 24 Feb 2020 10:26:15 -0800 (PST) Received: from localhost ([::1]:40722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6IQo-0003Pu-9I for importer@patchew.org; Mon, 24 Feb 2020 13:26:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57218) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6IQ6-0002yF-W6 for qemu-devel@nongnu.org; Mon, 24 Feb 2020 13:25:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6IQ5-0006Mc-2g for qemu-devel@nongnu.org; Mon, 24 Feb 2020 13:25:30 -0500 Received: from mga06.intel.com ([134.134.136.31]:8901) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6IQ4-00063n-Ou for qemu-devel@nongnu.org; Mon, 24 Feb 2020 13:25:29 -0500 Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2020 10:25:19 -0800 Received: from tjnagler-mobl.ger.corp.intel.com (HELO localhost.localdomain) ([10.252.27.40]) by fmsmga007.fm.intel.com with ESMTP; 24 Feb 2020 10:25:17 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,481,1574150400"; d="scan'208";a="229914978" From: Sebastien Boeuf To: qemu-devel@nongnu.org Subject: [PATCH v2] docs: Update vhost-user spec regarding backend program conventions Date: Mon, 24 Feb 2020 19:24:54 +0100 Message-Id: <20200224182454.24610-1-sebastien.boeuf@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.31 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcandre.lureau@redhat.com, sebastien.boeuf@intel.com, berrange@redhat.com, stefanha@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The vhost-user specification is not clearly stating the expected behavior from a backend program whenever the client disconnects. This patch addresses the issue by defining the default behavior and proposing an alternative through a command line option. By default, a backend program will terminate whenever the client disconnects, unless told otherwise through the newly introduced option --keep-listening. Signed-off-by: Sebastien Boeuf Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi --- docs/interop/vhost-user.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 5f8b3a456b..078f8e2e57 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -1323,6 +1323,10 @@ The backend program must end (as quickly and cleanly= as possible) when the SIGTERM signal is received. Eventually, it may receive SIGKILL by the management layer after a few seconds. =20 +By default, the backend program terminates after the client disconnects. +This is useful to keep the backend program's lifetime synchronized with +its client process. + The following command line options have an expected behaviour. They are mandatory, unless explicitly said differently: =20 @@ -1337,6 +1341,14 @@ are mandatory, unless explicitly said differently: vhost-user socket as file descriptor FDNUM. It is incompatible with --socket-path. =20 +--keep-listening + + When this option is provided, the backend program must keep listening + after the client disconnects. It accepts only 1 connection at a time + on each UNIX domain socket. This prevents the management layer from + having to spawn a new backend program each and every time the client + disconnects. + --print-capabilities =20 Output to stdout the backend capabilities in JSON format, and then --=20 2.20.1 --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris,=20 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.