From nobody Wed Nov 27 04:42:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555346028; cv=none; d=zoho.com; s=zohoarc; b=eSj7wkuw7MCWvta7Lk5JnVTX95UZw6Vv+WPdqBQa6XBeIcTWKmFsPT94wQxY/lAf0+mLZXrkPSrDDDNFpfEJG5TW2jRaZBAyS3rQwKDCMeKwWE2s08X/S9gvTRuxsTbFRCiYLF3isde8dd9Tx2TereR1zldZ87h+BPiQcIvNlS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555346028; 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:ARC-Authentication-Results; bh=M54qe/Os0vi1oxG1K7MDxSwqlEssUHBbQWtaiBmk3/I=; b=Li8/vC6ulec0iRRYTUyR/LBHymGgJ6p/A3f/Mbs1TZbzKkIoVEmDT0Mb4Gj+pQYTqUJf0svoems6rYJ+dY//HObA26mEiC1FRaOew10xwG6NcOKOpLTOdU8MZxk0tpz+OEYmQ+Dk8SXvo3rLqBPEUOU6hrYrZo8fQlUGwjdR7FU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155534602879313.600727632191933; Mon, 15 Apr 2019 09:33:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD7D13003AEC; Mon, 15 Apr 2019 16:33:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 490BC60D27; Mon, 15 Apr 2019 16:33:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0160A181AC46; Mon, 15 Apr 2019 16:33:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FGXj9F009914 for ; Mon, 15 Apr 2019 12:33:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8B2635D73C; Mon, 15 Apr 2019 16:33:45 +0000 (UTC) Received: from localhost (unknown [10.36.112.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0B6465D733; Mon, 15 Apr 2019 16:33:37 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Mon, 15 Apr 2019 18:33:36 +0200 Message-Id: <20190415163337.2795-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: "reviewer:Incompatible changes" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Paolo Bonzini Subject: [libvirt] [PATCH v4] socket: allow wait=false for client socket X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 15 Apr 2019 16:33:47 +0000 (UTC) Commit 767abe7 ("chardev: forbid 'wait' option with client sockets") is a bit too strict. Current libvirt always set wait=3Dfalse, and will thus fail to add client chardev. Make the code more permissive, allowing wait=3Dfalse with client socket chardevs. Deprecate usage of 'wait' with client sockets. Fixes: 767abe7f49e8be14d29da5db3527817b5d696a52 Cc: Daniel P. Berrang=C3=A9 Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Daniel P. Berrang=C3=A9 --- chardev/char-socket.c | 12 ++++++++---- qemu-deprecated.texi | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index 3916505d67..b2cf593107 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -1263,10 +1263,14 @@ static bool qmp_chardev_validate_socket(ChardevSock= et *sock, return false; } if (sock->has_wait) { - error_setg(errp, "%s", - "'wait' option is incompatible with " - "socket in client connect mode"); - return false; + warn_report("'wait' option is deprecated with " + "socket in client connect mode"); + if (sock->wait) { + error_setg(errp, "%s", + "'wait' option is incompatible with " + "socket in client connect mode"); + return false; + } } } =20 diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 2219386769..842e71b11d 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -105,6 +105,11 @@ details. The ``query-events'' command has been superseded by the more powerful and accurate ``query-qmp-schema'' command. =20 +@subsection chardev client socket with 'wait' option (since 4.0) + +Character devices creating sockets in client mode should not specify +the 'wait' field, which is only applicable to sockets in server mode + @section Human Monitor Protocol (HMP) commands =20 @subsection The hub_id parameter of 'hostfwd_add' / 'hostfwd_remove' (sinc= e 3.1) --=20 2.21.0.313.ge35b8cb8e2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list