From nobody Sat May 18 18:02:05 2024 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612449824; cv=none; d=zohomail.com; s=zohoarc; b=Rpc+xPqKITqtp2XDEWZgHqlL80u3c+LZ51jLyBq0MS0ecLuiIXzv4FFKYxU3aTyN1O/0Kl0T1WNDEC+oWiSAuC9skHrX9EyPn59MUM17rJEFPyCani/YLOIkr8dukb9hA6DHyi2hzCkR7ir0NtkGIqJq8BR7q1kPzEvZSANxLnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612449824; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zLjgWV8Q3RCpZchbXm/5IEIRLVNhIvbQi4mRUsAJg3E=; b=PviHpZ0QapzAKQr0V1tGyCPHb2ovt04jXXRSW3Gtj8o5Wj25GQWNWAhqNvkPw1hcIGnnRWIeMfex0n/6RykGkfLlFAClK1nuw8VUOqIVe0I+/mesCP87WlDhR+zaY3QkFPdc8WnFB3VtAXimgMI374kqR3SEwBrUSzy4PStLkNk= 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; dmarc=pass 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 1612449824803823.5497462374306; Thu, 4 Feb 2021 06:43:44 -0800 (PST) Received: from localhost ([::1]:43068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fH3-00016F-C1 for importer@patchew.org; Thu, 04 Feb 2021 09:06:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50822) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCe-0003ge-DO for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:36903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCa-00007M-LL for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:48 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-587-v1UzqxL5NfGIT4GUYjIe8A-1; Thu, 04 Feb 2021 09:01:39 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25C40874982; Thu, 4 Feb 2021 14:01:38 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D4D155C54B; Thu, 4 Feb 2021 14:01:37 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6B6EA113861E; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zLjgWV8Q3RCpZchbXm/5IEIRLVNhIvbQi4mRUsAJg3E=; b=g+HJsrrg2ulNeTeDAc1AaDnQ9oUhaqZzIH2lEpP+ZXL9CP57WOXWR6TKv1NyUa/XloqKYh MGSuPlo2nUiQQWGH0jDdywATuqF4lI6IX0UreZ6ZexVetbiCMC25Y7ScbohNBQvn7ji1+0 5BU4YnwPDTJ0T2r/ltyIli5Ks26JznE= X-MC-Unique: v1UzqxL5NfGIT4GUYjIe8A-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 1/9] monitor/qmp-cmds.c: Don't include ui/vnc.h Date: Thu, 4 Feb 2021 15:01:28 +0100 Message-Id: <20210204140136.2769065-2-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=216.205.24.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Peter Maydell The qmp-cmds.c file currently includes ui/vnc.h, which (being located in the ui/ directory rather than include) is really supposed to be for use only by the ui subsystem. In fact the function prototypes we need (vnc_display_password(), etc) are all declared in include/ui/console.h, so we can switch to including that instead. (ui/vnc.h includes include/ui/console.h, so this change strictly reduces the quantity of headers qmp-cmds.c pulls in.) Signed-off-by: Peter Maydell Message-Id: <20210104161200.15068-1-peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Markus Armbruster --- monitor/qmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 990936136c..c7df8c0ee2 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -23,7 +23,7 @@ #include "qemu/uuid.h" #include "chardev/char.h" #include "ui/qemu-spice.h" -#include "ui/vnc.h" +#include "ui/console.h" #include "sysemu/kvm.h" #include "sysemu/runstate.h" #include "sysemu/runstate-action.h" --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612449904; cv=none; d=zohomail.com; s=zohoarc; b=Z+ZmVm/6kyLrfJJNcTuuIOkLa8DLXznnbXuq1DKyjGX9npVKfZl66tnXRgb/hg7ya2sefmJqcv/ch0xaO2I1F2/MbAcmmBy+Ps/9QjYUVKdw5ii1vka8nLLzT5ZlwKgjTwB1/6m6a0GztLvfHd9kxfRjJfpW04GEFai589MSH+4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612449904; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=WiKUwcqAxk/6h1IpL+D52uPALPdCahks4rIdmD6Ny/A=; b=Y9AaOQFBhMvMGbjDpMcSzx0zKxovcBiJJh6SvZUj6a1rrFVpyq9ynz+ieqFUnoeR56DaOmWGBeASbISiQkgznVt3hvm9hb3EHq0g7amVSIMey+rjw/zKwECdwpmyLqc9XbfG767Fp4/hCaZ87juSTvUDiivsUq1OOHjf0lz+1co= 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; dmarc=pass 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 1612449904362141.83232824308232; Thu, 4 Feb 2021 06:45:04 -0800 (PST) Received: from localhost ([::1]:42158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fGu-0000hQ-8X for importer@patchew.org; Thu, 04 Feb 2021 09:06:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCd-0003g1-Jf for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCa-00007D-Ej for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:47 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-567-h4xDiwM_NCqx9yRS6cUoRg-1; Thu, 04 Feb 2021 09:01:41 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id B44E9107ACC7; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B2ED6F984; Thu, 4 Feb 2021 14:01:37 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6EB181138461; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WiKUwcqAxk/6h1IpL+D52uPALPdCahks4rIdmD6Ny/A=; b=HwBArAxcAGgvP3aUofhXcUxy/P5Np3jvcTxj00Pp9gFypmsz4Crz4nkyOIKK2K+AZ5qcWa pc4H+eBeDo6hV2t5Ub6h+7GSOzt5TTAxSdA5e227WpGbspyZGLmKByMsHlp7bp239jUgQK rbAtj+BxkRPVkT8mvBLx/dgj8FoTF2Q= X-MC-Unique: h4xDiwM_NCqx9yRS6cUoRg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 2/9] qobject: open brace '{' following struct go on the same line Date: Thu, 4 Feb 2021 15:01:29 +0100 Message-Id: <20210204140136.2769065-3-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=216.205.24.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Zhang Han , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Zhang Han Put open brace '{' on the same line of struct. Signed-off-by: Zhang Han Message-Id: <20201228071129.24563-2-zhanghan64@huawei.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qobject/json-parser.c | 3 +-- qobject/qjson.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qobject/json-parser.c b/qobject/json-parser.c index d351039b10..008b326fb8 100644 --- a/qobject/json-parser.c +++ b/qobject/json-parser.c @@ -31,8 +31,7 @@ struct JSONToken { char str[]; }; =20 -typedef struct JSONParserContext -{ +typedef struct JSONParserContext { Error *err; JSONToken *current; GQueue *buf; diff --git a/qobject/qjson.c b/qobject/qjson.c index bcc376e626..167fcb429c 100644 --- a/qobject/qjson.c +++ b/qobject/qjson.c @@ -22,8 +22,7 @@ #include "qapi/qmp/qnum.h" #include "qapi/qmp/qstring.h" =20 -typedef struct JSONParsingState -{ +typedef struct JSONParsingState { JSONMessageParser parser; QObject *result; Error *err; --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612449828; cv=none; d=zohomail.com; s=zohoarc; b=lz6kH9RQ9qpOA5gfpmgMibE/Mk9hwdUm6wPvEYpcXAKN6j0KcSZgjBmJaRBmnA/R3D6YaS4u9NK+FCtulE3hGq9rWymy/YzRJ4Jr5OXPA+E9EwKL3XUyv6WwjoXDnLeJnRxoEGuTTmSdt0Fu0B1xbTaQa990wJ6YhjjgZgn41tQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612449828; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ikr8HeGtt1+y/GKfPrOvTl5EQwsX7uwyKwQWVt0oj8k=; b=JCkjZJDLeRU2dP3m6vvb+aLwnCdJmOMOdz0XFWqrbS7t8f+Nz0+nRSr7qhje8j+yP6m20FATD+RGOQPct7YuvewA+w0EEqPMw3d5j2wowsI8byNd/ErgHaWAlbXndj68l3aBoxl3HH+Wf/YQDSUJksRljA+Mn/59NX7ZNg5wTJ4= 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; dmarc=pass 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 161244982846478.92805924772836; Thu, 4 Feb 2021 06:43:48 -0800 (PST) Received: from localhost ([::1]:42096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fGt-0000el-Ek for importer@patchew.org; Thu, 04 Feb 2021 09:06:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCc-0003d9-67 for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCZ-00006V-Ep for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:45 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-593-PtyFhFGkPAGcwOPTldKoJw-1; Thu, 04 Feb 2021 09:01:39 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 566ED874983; Thu, 4 Feb 2021 14:01:38 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 28BB41007613; Thu, 4 Feb 2021 14:01:37 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 71D841138468; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ikr8HeGtt1+y/GKfPrOvTl5EQwsX7uwyKwQWVt0oj8k=; b=RTB7fe7cDwBKO3pm0vxCDwgYUSb7XgEZwAzNHjxkbEp1fpJq3cTcMmqPg/5faJnaos4SBq a3bbTzbxJS306EH64h0zXed9DD7yBoh3zeWbt86YQUAE8vMRrb028bU0Ddjeq0HwKSkgCd AGR3jGi2S1x6DOlu+Ax+lwkrGlJqMN0= X-MC-Unique: PtyFhFGkPAGcwOPTldKoJw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 3/9] qobject: code indent should never use tabs Date: Thu, 4 Feb 2021 15:01:30 +0100 Message-Id: <20210204140136.2769065-4-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Zhang Han Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Zhang Han Transfer tabs to spaces. Signed-off-by: Zhang Han Message-Id: <20201228071129.24563-3-zhanghan64@huawei.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qobject/qdict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qobject/qdict.c b/qobject/qdict.c index d84443391e..d4d016ad69 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -39,8 +39,8 @@ QDict *qdict_new(void) */ static unsigned int tdb_hash(const char *name) { - unsigned value; /* Used to compute the hash value. */ - unsigned i; /* Used to cycle through random values. */ + unsigned value; /* Used to compute the hash value. */ + unsigned i; /* Used to cycle through random values. */ =20 /* Set the initial value from the key size. */ for (value =3D 0x238F13AF * strlen(name), i=3D0; name[i]; i++) --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612447406; cv=none; d=zohomail.com; s=zohoarc; b=Lx08gRMA3w14p/VUbnvVZmniQ+S7N2qAlF0MELSB0zAetcgoz+dWQb5/1PJpMIKF3O2DiX0yUavnsweOcbYOgc9I4zKJN0RXL5lwCc1LyUcIqNQ1HtirTlJGxxRcw8CNGrmgOvZAzvftlTRIhCnQPCOSxEClW+3krg9Uj0aT2yg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612447406; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rKakoUWWM51gd4bpqXg6qPds9kR40pcJ4dQlkCnoLSU=; b=jHRKmhyI9dmvcB+tQGvc98LP5NiWncCW2Zxjo6j9Bfmu/aVjYMoqKH6NiigYllBkvZcO9gCZYNoG8J6dC2YwiphcOLxAmEg2VvzraUDanEZpbh6PVAL4HqAsQJcSvkg/BF4yRQY3lX1H7HOcf2zf63X7O3rd80hVg0k+K/n1h3M= 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; dmarc=pass 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 1612447406018253.03947017022654; Thu, 4 Feb 2021 06:03:26 -0800 (PST) Received: from localhost ([::1]:33750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fEB-0005OX-0e for importer@patchew.org; Thu, 04 Feb 2021 09:03:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCa-0003b9-Sw for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCZ-00006X-AJ for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:44 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-593-H1OkqVXpM9WtB3q91bbkFw-1; Thu, 04 Feb 2021 09:01:39 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59B3F801960; Thu, 4 Feb 2021 14:01:38 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B4F15B695; Thu, 4 Feb 2021 14:01:37 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 757C71132FD3; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rKakoUWWM51gd4bpqXg6qPds9kR40pcJ4dQlkCnoLSU=; b=KuJtoetWwbg0M8RT/+5pWe5JTMObz5a3VuWMNEnnhNTb8GaHkof3rSY7qap6qtqClWCg9x IeO56KUro3GWhvPOiWWGUM1Hmt/E2TBzYXkMZosYbNyItOtLA99ui2fbr65fHDtT9UGL59 gp49lnIh3hDHxf/WK8Ho96gRS5QDwBQ= X-MC-Unique: H1OkqVXpM9WtB3q91bbkFw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 4/9] qobject: spaces required around that operators Date: Thu, 4 Feb 2021 15:01:31 +0100 Message-Id: <20210204140136.2769065-5-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Zhang Han Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" From: Zhang Han Add spaces around operators. Signed-off-by: Zhang Han Message-Id: <20201228071129.24563-4-zhanghan64@huawei.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qobject/qdict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qobject/qdict.c b/qobject/qdict.c index d4d016ad69..6c15ed14c1 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -43,8 +43,8 @@ static unsigned int tdb_hash(const char *name) unsigned i; /* Used to cycle through random values. */ =20 /* Set the initial value from the key size. */ - for (value =3D 0x238F13AF * strlen(name), i=3D0; name[i]; i++) - value =3D (value + (((const unsigned char *)name)[i] << (i*5 % 24)= )); + for (value =3D 0x238F13AF * strlen(name), i =3D 0; name[i]; i++) + value =3D (value + (((const unsigned char *)name)[i] << (i * 5 % 2= 4))); =20 return (1103515243 * value + 12345); } --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612447407; cv=none; d=zohomail.com; s=zohoarc; b=P1CVqsZsPadvNj9GiqrIEZwudXZQI/bHoNO608oY9ApNnQ2YsGwe3ALgu8ygIwMdV29ybYMLkyvkx3H6gXy9lz1RyAmxt0OKZiG75H5v14lKJl8qw2kGfknAN6GCCMcDiydbWcXH6pV+/uDeQ5wGT0WbdwsdwrhyeyL9enjqqKc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612447407; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eYkx+KWuTRBrdNwxsyutSYflX87Swhop9kFSdxEK3WY=; b=Uz+WVg+PGtAsJFUXKgMXs3FcH5l74KWuYWr3FmbEVmDIhV45w1LOHyEeG/lV6UPZTr48Ps9GB6Nw7EpConoYNjKb1LXbASSkVQsfq+02ru/HvwDx3p1TvRCLYPFZUcT+/6VR41oxlDwrnGYtazSzVP+obz0SfjLaRD/PlBjNsvA= 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; dmarc=pass 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 16124474069510.5672453566080549; Thu, 4 Feb 2021 06:03:26 -0800 (PST) Received: from localhost ([::1]:33838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fEC-0005Qt-3o for importer@patchew.org; Thu, 04 Feb 2021 09:03:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCc-0003dS-Dp for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCa-00006z-1T for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:46 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-33-9MY6X7ucPme3Bp8U0IV3Ww-1; Thu, 04 Feb 2021 09:01:40 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id CCB49107ACE3; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D75E6F992; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 78B971132E9A; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eYkx+KWuTRBrdNwxsyutSYflX87Swhop9kFSdxEK3WY=; b=JEkf/YbJexjpQL7e240ghY+Udy8j314vtHqPdDv0aK4F5JoHEp45WZ6D8iBFfBBBPEIqju 6alsbJzL3CfbHz3uQDDdmWRwTHCk98oYiDk5vj1c+UXaR2O+OFo+ebpcokBnYnLzKVNA/p dbmckZUWVkkLod+jf0EWMko5n19I6d4= X-MC-Unique: 9MY6X7ucPme3Bp8U0IV3Ww-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 5/9] qobject: braces {} are necessary for all arms of this statement Date: Thu, 4 Feb 2021 15:01:32 +0100 Message-Id: <20210204140136.2769065-6-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" 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=216.205.24.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Zhang Han , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) From: Zhang Han Add braces {} for arms of if/for statement Signed-off-by: Zhang Han Message-Id: <20201228071129.24563-5-zhanghan64@huawei.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qobject/qdict.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qobject/qdict.c b/qobject/qdict.c index 6c15ed14c1..0216ca7ac1 100644 --- a/qobject/qdict.c +++ b/qobject/qdict.c @@ -43,8 +43,9 @@ static unsigned int tdb_hash(const char *name) unsigned i; /* Used to cycle through random values. */ =20 /* Set the initial value from the key size. */ - for (value =3D 0x238F13AF * strlen(name), i =3D 0; name[i]; i++) + for (value =3D 0x238F13AF * strlen(name), i =3D 0; name[i]; i++) { value =3D (value + (((const unsigned char *)name)[i] << (i * 5 % 2= 4))); + } =20 return (1103515243 * value + 12345); } @@ -93,8 +94,9 @@ static QDictEntry *qdict_find(const QDict *qdict, QDictEntry *entry; =20 QLIST_FOREACH(entry, &qdict->table[bucket], next) - if (!strcmp(entry->key, key)) + if (!strcmp(entry->key, key)) { return entry; + } =20 return NULL; } --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612451142; cv=none; d=zohomail.com; s=zohoarc; b=YYSxbWv+yWdO9+h3e0MMp0V07uv1aE+XBPB9Me3VkS2xw3BXpmIhzYi8KI4DFtnmPHZGB+pbOKwxplaRWS1fpQA5hh8YWOSv0UswqdOECDUvh4ggFwQVR8M9TaPos+s1nlApiLbcocKfVLAZ08v0E9I4aa9xBEqn4hcCXaxtV5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612451142; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kCkCGcSd4+EHtfCUhrTpgqeZA87reYcrwgi2tA/mqsc=; b=F2mAATAFspbFVsfDEc5DXqy38yt3xMU7e5TpU/DqWRGj01ccocgINi5CIg9o5jgImM+fK/gDpkW3wRYFbr3yLKr92GUDN+n4A/3K+NxySNPBXdwctfmjaI3GAYcgAKPkkERec3LU5E52OJ+E62B2NPPD3iqDyCAXRiN8e9hs3vM= 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; dmarc=pass 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 1612451142896203.42775072433972; Thu, 4 Feb 2021 07:05:42 -0800 (PST) Received: from localhost ([::1]:50014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fIn-0004IF-3z for importer@patchew.org; Thu, 04 Feb 2021 09:08:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCe-0003gL-6t for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:20262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCa-00007F-HJ for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:47 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-492--kSpU7ftNU67VxAs21ffXQ-1; Thu, 04 Feb 2021 09:01:41 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CE361874981; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D1375C6B8; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7BF0E1132EA4; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kCkCGcSd4+EHtfCUhrTpgqeZA87reYcrwgi2tA/mqsc=; b=aGJ71VcH8NAX9wqLvzAQRxJdFxReEA1dQmg0rHBAHeogp0RRLYPiVPyfXFFg1ch+pc2BOl jj6kcQieED1AtCW9pv9sEGYGcozu18OwxuFpqgBSLBtfqq5yFohsTQUnkqp3nIJHq8YOy+ gBdP+eV2+PAsxr3aPWTWStiYfe3cnk4= X-MC-Unique: -kSpU7ftNU67VxAs21ffXQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 6/9] docs/interop/qmp-spec: Document the request queue limit Date: Thu, 4 Feb 2021 15:01:33 +0100 Message-Id: <20210204140136.2769065-7-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster Message-Id: <20210127144734.2367693-1-armbru@redhat.com> Reviewed-by: John Snow --- docs/interop/qmp-spec.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/interop/qmp-spec.txt b/docs/interop/qmp-spec.txt index cdf5842555..b0e8351d5b 100644 --- a/docs/interop/qmp-spec.txt +++ b/docs/interop/qmp-spec.txt @@ -133,9 +133,11 @@ to pass "id" with out-of-band commands. Passing it wi= th all commands is recommended for clients that accept capability "oob". =20 If the client sends in-band commands faster than the server can -execute them, the server will stop reading the requests from the QMP -channel until the request queue length is reduced to an acceptable -range. +execute them, the server will stop reading requests until the request +queue length is reduced to an acceptable range. + +To ensure commands to be executed out-of-band get read and executed, +the client should have at most eight in-band commands in flight. =20 Only a few commands support out-of-band execution. The ones that do have "allow-oob": true in output of query-qmp-schema. --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612448524; cv=none; d=zohomail.com; s=zohoarc; b=dJhhSWAJu7CgEFi17PEaWWZy9QAbcQjVcG3RIneTC2YAOpOjlJLLo9X+yRjLL3ZVTiYFIktfHIEHw8oqfqefoRIRuBuh6iwH5SpOUJIoY7NNf7pwBS+SJqHZzpwHmdXEYC+z/yyDgJliN9ybrH2fjefz/YZCeungL3IByqd1TkQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612448524; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=76RWcd1K3oKVR8NnoWJu5TCiHHFpW8Dns/BvI3/KPIg=; b=P7+ASKMOPn5fA1878Z8aBqGy3rn7X96m/SwSAMji3n0xLGzTvrccZYZqAhdMUl4EDGipGwpEGtaGUvoH+iCGVdOKv9JoO7Yf7fpMpQiX44AUwNnK4pRdmjjRQIuBtoiNytCpxtyol1mkZgZ2apWdKOXBfZq8NF+k1uUkfrm0WqA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1612448524602138.91009700406505; Thu, 4 Feb 2021 06:22:04 -0800 (PST) Received: from localhost ([::1]:58442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fME-00080z-6W for importer@patchew.org; Thu, 04 Feb 2021 09:11:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCf-0003j1-7H for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCZ-00006g-HM for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:48 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-569-LYgP60GkNtCfJshF51cuPg-1; Thu, 04 Feb 2021 09:01:40 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D81A6801966; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A87B85D9C9; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7F1C11132D67; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=76RWcd1K3oKVR8NnoWJu5TCiHHFpW8Dns/BvI3/KPIg=; b=BAUoq4xel3ajH/JFX9jRDPbs2TxIVnfNDnnYIl23XF32J+FOgJggcITT1ZT4DUT0k0glh9 0KVtnMCy7X2G8OQpH58FCyCzz80NxEqHr3oC1LzeLgfC4lBLnhenHGspMnriTDn65ZRtOa RaVBftiwiULCU3UYMZYOJfQn+g3cxqA= X-MC-Unique: LYgP60GkNtCfJshF51cuPg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 7/9] qmp: Fix up comments after commit 9ce44e2ce2 Date: Thu, 4 Feb 2021 15:01:34 +0100 Message-Id: <20210204140136.2769065-8-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=216.205.24.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Commit 9ce44e2ce2 "qmp: Move dispatcher to a coroutine" replaced monitor_qmp_bh_dispatcher() by monitor_qmp_dispatcher_co(), but neglected to update comments. Do that now. Signed-off-by: Markus Armbruster Message-Id: <20210201161504.1976989-2-armbru@redhat.com> Reviewed-by: Kevin Wolf --- monitor/qmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor/qmp.c b/monitor/qmp.c index 8f91af32be..f6a1e7783b 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -79,7 +79,7 @@ static void monitor_qmp_cleanup_queue_and_resume(MonitorQ= MP *mon) qemu_mutex_lock(&mon->qmp_queue_lock); =20 /* - * Same condition as in monitor_qmp_bh_dispatcher(), but before + * Same condition as in monitor_qmp_dispatcher_co(), but before * removing an element from the queue (hence no `- 1`). * Also, the queue should not be empty either, otherwise the * monitor hasn't been suspended yet (or was already resumed). @@ -349,7 +349,7 @@ static void handle_qmp_command(void *opaque, QObject *r= eq, Error *err) =20 /* * Suspend the monitor when we can't queue more requests after - * this one. Dequeuing in monitor_qmp_bh_dispatcher() or + * this one. Dequeuing in monitor_qmp_dispatcher_co() or * monitor_qmp_cleanup_queue_and_resume() will resume it. * Note that when OOB is disabled, we queue at most one command, * for backward compatibility. --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612448463; cv=none; d=zohomail.com; s=zohoarc; b=BqRcATNDPYmVmg3UHYbUe0UuAYK1Kt7BwHAumbvJ2mZDF1cJAHOoXmKHI579OG5UDvVHJ/6R8LeuK6wIgogYtkDNmj8AdH+hRev+1Qx88fS4LfHxwV8hMu2+zndLA98oQqvjG4sgaIcGiN+zoAvFN9THgB8Dpokm8IaYjKgpTKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612448463; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rLxYNuVKbLaHExy22fumUpWboafTmTjNstltLuznAVM=; b=jwT38ATvXzzdokdxiXlJPGjADhPUnP0BTcMjlPY+f1d4RHcRwvd4+jdn3lIoRcc97jBkxDFDNQzMpmQtvgWsfp/9r0ExIMRO6cpaOns4krCvO2yi0y3/S6ffsaRhVrx8R+Y8dDk3yIR49rlgijd5tPHkdhokUUjX/FqR2tT9JtA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1612448463006177.18526611160314; Thu, 4 Feb 2021 06:21:03 -0800 (PST) Received: from localhost ([::1]:34892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fEL-0005uC-JM for importer@patchew.org; Thu, 04 Feb 2021 09:03:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCb-0003cf-R1 for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:56437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCZ-00006e-TZ for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:45 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-vcKOnUJkN1e2l_bEglbAlQ-1; Thu, 04 Feb 2021 09:01:40 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E05A0100C617; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B05235B698; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 826051132CB1; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rLxYNuVKbLaHExy22fumUpWboafTmTjNstltLuznAVM=; b=UXZG6qFutqMpRXjqflKzGcKf7pLIazzHmLmigHUo+SBSpnq7IaWlwW/zlSK1nDk02esK88 oePS45oQ/TTXCG0z+TYZd7t90zfXWw5WZMk5yXnCeKdSPAnLsCMnjFP5cnXxBagwecNdu1 0ZKNSrrDuvI+EvN+YgIoaEvCkOnXqec= X-MC-Unique: vcKOnUJkN1e2l_bEglbAlQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 8/9] qmp: Add more tracepoints Date: Thu, 4 Feb 2021 15:01:35 +0100 Message-Id: <20210204140136.2769065-9-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add tracepoints for in-band request enqueue and dequeue, processing of queued in-band errors, and responses. Signed-off-by: Markus Armbruster Message-Id: <20210201161504.1976989-3-armbru@redhat.com> Reviewed-by: Kevin Wolf --- monitor/qmp.c | 7 +++++++ monitor/trace-events | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/monitor/qmp.c b/monitor/qmp.c index f6a1e7783b..e37b047c8a 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -113,6 +113,7 @@ void qmp_send_response(MonitorQMP *mon, const QDict *rs= p) =20 json =3D qobject_to_json_pretty(data, mon->pretty); assert(json !=3D NULL); + trace_monitor_qmp_respond(mon, json->str); =20 g_string_append_c(json, '\n'); monitor_puts(&mon->common, json->str); @@ -251,6 +252,9 @@ void coroutine_fn monitor_qmp_dispatcher_co(void *data) } } =20 + trace_monitor_qmp_in_band_dequeue(req_obj, + req_obj->mon->qmp_requests->leng= th); + if (qatomic_xchg(&qmp_dispatcher_co_busy, true) =3D=3D true) { /* * Someone rescheduled us (probably because a new requests @@ -287,6 +291,7 @@ void coroutine_fn monitor_qmp_dispatcher_co(void *data) monitor_qmp_dispatch(mon, req_obj->req); } else { assert(req_obj->err); + trace_monitor_qmp_err_in_band(error_get_pretty(req_obj->err)); rsp =3D qmp_error_response(req_obj->err); req_obj->err =3D NULL; monitor_qmp_respond(mon, rsp); @@ -364,6 +369,8 @@ static void handle_qmp_command(void *opaque, QObject *r= eq, Error *err) * handled in time order. Ownership for req_obj, req, * etc. will be delivered to the handler side. */ + trace_monitor_qmp_in_band_enqueue(req_obj, mon, + mon->qmp_requests->length); assert(mon->qmp_requests->length < QMP_REQ_QUEUE_LEN_MAX); g_queue_push_tail(mon->qmp_requests, req_obj); qemu_mutex_unlock(&mon->qmp_queue_lock); diff --git a/monitor/trace-events b/monitor/trace-events index 0365ac4d99..348dcfca9b 100644 --- a/monitor/trace-events +++ b/monitor/trace-events @@ -10,6 +10,10 @@ monitor_protocol_event_queue(uint32_t event, void *qdict= , uint64_t rate) "event=3D monitor_suspend(void *ptr, int cnt) "mon %p: %d" =20 # qmp.c +monitor_qmp_in_band_enqueue(void *req, void *mon, unsigned len) "%p mon %p= len %u" +monitor_qmp_in_band_dequeue(void *req, unsigned len) "%p len %u" monitor_qmp_cmd_in_band(const char *id) "%s" +monitor_qmp_err_in_band(const char *desc) "%s" monitor_qmp_cmd_out_of_band(const char *id) "%s" +monitor_qmp_respond(void *mon, const char *json) "mon %p resp: %s" handle_qmp_command(void *mon, const char *req) "mon %p req: %s" --=20 2.26.2 From nobody Sat May 18 18:02:05 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612449136; cv=none; d=zohomail.com; s=zohoarc; b=REwmL983XpPWRAQGdhCrmaoIgU4XeXolX7FeX65sv6tvk8NxSXzxGS7xIEp2Rbcl7HlLZ3b6kTnpfi5m7etUNpTn+7wx/JiNilpGnNRSKHv2LeUgqL1AteDx5K3wEYuTf58ANV+K1+9qPA/C9a0eoGbPTlDkULBHgfvYDlAvk4Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612449136; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IotvbUCmSDE4T2OYNQFShw1XGHkoEEmvbvO8RvMpH3Q=; b=FqbWE2dtyONgBjja+Pg8xxO0CzRzoa7IiGuPwd+kEaDQ4QahwHdAfkOQ5yUu8BdiVbz1cDqSPjVTfMCiiPaF9xFt4zJLk+6mX+uYMBW+c7/8iTe902DulqujldzL4BSVCw2JOMdvfL+TAJ9QUQpq4bcvpt4MGoSDnHKOtcJddNI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1612449136918620.8717225836878; Thu, 4 Feb 2021 06:32:16 -0800 (PST) Received: from localhost ([::1]:41814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7fGq-0000Vx-Kp for importer@patchew.org; Thu, 04 Feb 2021 09:06:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7fCl-0003oj-4W for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:27432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l7fCb-00008B-K0 for qemu-devel@nongnu.org; Thu, 04 Feb 2021 09:01:54 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-316-Jrd_l3r7PQScc6cdC0mVyQ-1; Thu, 04 Feb 2021 09:01:40 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E1A4D107ACE4; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-115-51.ams2.redhat.com [10.36.115.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B26B15C54B; Thu, 4 Feb 2021 14:01:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 859BE11329AC; Thu, 4 Feb 2021 15:01:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612447305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IotvbUCmSDE4T2OYNQFShw1XGHkoEEmvbvO8RvMpH3Q=; b=UbvvCWqcEVXSWeS/wyegcxg8w5MncQ38SzsIBLsGD4LXAwFGsYBy46/JptpYwSrnh1+xmj 5nii2o1du+gPUlLpWC07HPU7kMr2wYc+qWZ/O/Z0OQZLuQ8EkJ7VNm7iRRNv4ONS2qUXXU iKkkEAbEwMb6dG4cWgaY3u9Rj2uo8dk= X-MC-Unique: Jrd_l3r7PQScc6cdC0mVyQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PULL 9/9] qmp: Resume OOB-enabled monitor before processing the request Date: Thu, 4 Feb 2021 15:01:36 +0100 Message-Id: <20210204140136.2769065-10-armbru@redhat.com> In-Reply-To: <20210204140136.2769065-1-armbru@redhat.com> References: <20210204140136.2769065-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=armbru@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=63.128.21.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.351, 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" monitor_qmp_dispatcher_co() needs to resume the monitor if handle_qmp_command() suspended it. Two cases: 1. OOB enabled: suspended if mon->qmp_requests has no more space 2. OOB disabled: suspended always We resume only after we processed the request. Which can take a long time. Resume the monitor right when the queue has space to keep the monitor available for out-of-band commands even in this corner case. Leave the "OOB disabled" case alone. Signed-off-by: Markus Armbruster Message-Id: <20210201161504.1976989-4-armbru@redhat.com> Reviewed-by: Kevin Wolf [Trailing whitespace tidied up] --- monitor/qmp.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/monitor/qmp.c b/monitor/qmp.c index e37b047c8a..43880fa623 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -214,7 +214,7 @@ void coroutine_fn monitor_qmp_dispatcher_co(void *data) { QMPRequest *req_obj =3D NULL; QDict *rsp; - bool need_resume; + bool oob_enabled; MonitorQMP *mon; =20 while (true) { @@ -273,11 +273,32 @@ void coroutine_fn monitor_qmp_dispatcher_co(void *dat= a) aio_co_schedule(qemu_get_aio_context(), qmp_dispatcher_co); qemu_coroutine_yield(); =20 + /* + * @req_obj has a request, we hold req_obj->mon->qmp_queue_lock + */ + mon =3D req_obj->mon; - /* qmp_oob_enabled() might change after "qmp_capabilities" */ - need_resume =3D !qmp_oob_enabled(mon) || - mon->qmp_requests->length =3D=3D QMP_REQ_QUEUE_LEN_MAX - 1; + + /* + * We need to resume the monitor if handle_qmp_command() + * suspended it. Two cases: + * 1. OOB enabled: mon->qmp_requests has no more space + * Resume right away, so that OOB commands can get executed whi= le + * this request is being processed. + * 2. OOB disabled: always + * Resume only after we're done processing the request, + * We need to save qmp_oob_enabled() for later, because + * qmp_qmp_capabilities() can change it. + */ + oob_enabled =3D qmp_oob_enabled(mon); + if (oob_enabled + && mon->qmp_requests->length =3D=3D QMP_REQ_QUEUE_LEN_MAX - 1)= { + monitor_resume(&mon->common); + } + qemu_mutex_unlock(&mon->qmp_queue_lock); + + /* Process request */ if (req_obj->req) { if (trace_event_get_state(TRACE_MONITOR_QMP_CMD_IN_BAND)) { QDict *qdict =3D qobject_to(QDict, req_obj->req); @@ -298,10 +319,10 @@ void coroutine_fn monitor_qmp_dispatcher_co(void *dat= a) qobject_unref(rsp); } =20 - if (need_resume) { - /* Pairs with the monitor_suspend() in handle_qmp_command() */ + if (!oob_enabled) { monitor_resume(&mon->common); } + qmp_request_free(req_obj); =20 /* --=20 2.26.2