From nobody Mon Feb 9 13:37:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; dkim=fail; spf=pass (zoho.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 Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549305542786461.80835963532684; Mon, 4 Feb 2019 10:39:02 -0800 (PST) Received: from localhost ([127.0.0.1]:47282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqj8y-0006W4-N9 for importer@patchew.org; Mon, 04 Feb 2019 13:38:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59229) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqj6q-00051X-Im for qemu-devel@nongnu.org; Mon, 04 Feb 2019 13:36:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqj6p-0003Sq-KA for qemu-devel@nongnu.org; Mon, 04 Feb 2019 13:36:44 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:52536) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqj6n-0003GW-GZ for qemu-devel@nongnu.org; Mon, 04 Feb 2019 13:36:41 -0500 Received: by mail-wm1-x336.google.com with SMTP id m1so970034wml.2 for ; Mon, 04 Feb 2019 10:36:23 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id s132sm8836236wmf.28.2019.02.04.10.36.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Feb 2019 10:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uq88XevNaAe9eu11lkTZLr4wBoDW0L1eGz0bigET5TQ=; b=BRM+qemVIdQRwVTDeMWShwvWtckR38eP7QTUm517M0pIjpHoTwnwK7Co7HYQhgN8Lf LBY3Rwqe8pqP//ohxLI5U6VNqfBKWRRcVY/cCro6qM3PqRMiEkE/6x8vR2JY5wGIRv8W sHAox29ce+CTfXyGZUKpQCtRfMF96/srHRJULlnA6bZQk173cLVk3a6J3dMRY5clIfgZ OvpmqcPRAm/ZaQlOPxsKPVTPLhOhWF8ELzR0UqCIIeEUbuCU2TC9Aj7/gEp4rzkzT2kh LdkMAYnrj2KSSJwZQNlWb0x28psL0bXssI1//LBYBmv+Hy0ALO6pi3xLvKCi5XkvDA67 8SuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=uq88XevNaAe9eu11lkTZLr4wBoDW0L1eGz0bigET5TQ=; b=i3AO8muI1tADGDAStSzr5AbMAV2r++GFIIj7QmwWKrySUS63sNHF5Cg6+KdNeahacZ 9fEBET6heIb4G9aNnpIqstwcQCf5DJyi3LqhLFRXkuxycxa6xkNnaertwtIojRlG0M70 kDALup3ROPGGT54tRQ/oJ42vpZpU2uwhUmBAt+dsJmBfMM/HnfTv1NmUPcKLdiYuA1kb km/YSIEsjeTFyVmZaODVIUGM9VRYQhXluetmHx+NcugYWvM9bGWpPMSI9MqWV7sK1rBR MYjPj+/EIDB3OvuwK6BzZaelwn25YlmFTyQH9YSrvhYYOm6bfCTq4iw5SIjehlcJBzOI /uIA== X-Gm-Message-State: AHQUAuY+EmYgfzE/5PNP1S7xxp5qMQCKCyHCesDnzjEUJxyqbWpkYQov mfhc7g6pQiS6nW0njIx7w+ALJa2c X-Google-Smtp-Source: AHgI3IYqAk0XCsYsQ3ihC2di9pNCbgw9PMGoLNlpNQXm9Kz9Liws5R3AUBeTmZE/LarJhoGCpEm8Jw== X-Received: by 2002:a1c:2787:: with SMTP id n129mr590370wmn.128.1549305382582; Mon, 04 Feb 2019 10:36:22 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 4 Feb 2019 19:35:04 +0100 Message-Id: <1549305379-51117-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549305379-51117-1-git-send-email-pbonzini@redhat.com> References: <1549305379-51117-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::336 Subject: [Qemu-devel] [PULL 02/77] vhost-user-test: signal data_cond when s->rings changes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" X-ZohoMail-DKIM: fail (Header signature does not verify) This speeds up wait_for_rings_started, which currently is just waiting for the timeout before checking s->rings. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini Message-Id: <1543851204-41186-8-git-send-email-pbonzini@redhat.com> --- tests/vhost-user-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 9baaff4..8eb7943 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -384,6 +384,7 @@ static void chr_read(void *opaque, const uint8_t *buf, = int size) =20 assert(msg.payload.state.index < s->queues * 2); s->rings &=3D ~(0x1ULL << msg.payload.state.index); + g_cond_broadcast(&s->data_cond); break; =20 case VHOST_USER_SET_MEM_TABLE: @@ -425,6 +426,7 @@ static void chr_read(void *opaque, const uint8_t *buf, = int size) case VHOST_USER_SET_VRING_BASE: assert(msg.payload.state.index < s->queues * 2); s->rings |=3D 0x1ULL << msg.payload.state.index; + g_cond_broadcast(&s->data_cond); break; =20 case VHOST_USER_GET_QUEUE_NUM: --=20 1.8.3.1