From nobody Mon Feb 9 17:08:14 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 1549391409603677.9721886170297; Tue, 5 Feb 2019 10:30:09 -0800 (PST) Received: from localhost ([127.0.0.1]:37461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr5Tv-0005OH-IE for importer@patchew.org; Tue, 05 Feb 2019 13:30:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gr5GH-0002Jm-Tm for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:16:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gr5GG-0003kg-HZ for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:15:57 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:40705) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gr5GG-0003Ta-47 for qemu-devel@nongnu.org; Tue, 05 Feb 2019 13:15:56 -0500 Received: by mail-wr1-x432.google.com with SMTP id p4so4706195wrt.7 for ; Tue, 05 Feb 2019 10:15:30 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id p5sm8931665wmh.16.2019.02.05.10.15.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Feb 2019 10:15:28 -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=nt/wCpnObCu3zP2vOI1Nq4ZQ2BTc90UQhvxKnrEFPxePXIfI6ghyBjbWp4Rnf2heGR oxLCAE7aOEanpRNqLAEvczh1vYR2C+lSADunoLyVKK2BAetarka+rOar0eSmU6MEcNWZ szz5eJwGU9BssrHHww9p9uLVI3oS1qUIiyyAJsXSOCwEtfJ0nt4Eyy6Bmam6A9OxM+X7 M454ER5Hpjq+2V70DuIEmFze9XpH42szSSGeophIu5NmyjcSF15WRPbuQwT6ACslZJ69 Ii9sgxTgfvQ0h+5i5nV+1qn6stSN4iSIDeiU1v1mMjI+oy5z/frvlhcuIsgeTJlXZ+3N R8kw== 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=Onjebj92RoxtmdpaVfjay9U7ZJ7lcSQ3KbjZa/L9vx2Ro6l0sO3UqyDb0RqK8sJ7t+ G9/51IBj8tzjwqKz9ugANyxtfF4pRFJSTiTHY7MAzd10O29kykq4fwNqpZQ9XUnDGdwW gyMVvEx7+CGJ2GVUitaTykzFFfmugy47r8LxKaQMlO1YIj+D6N2EQzI2uyzPFR1olyBL 63raE/kSk8B8jJk4C8YhRLHfaH5necUqbv/LeqDjpSF2AvSdU8oTIviAy2Jg7vnCnrGq PPL61ktvp1yKKAYvTTWhNhlIunPbIJy+kkMNvPkWwvUeILQwSfbh4R88iagBml4Htoom /qJA== X-Gm-Message-State: AHQUAubRdbag/GQ7/5b/78YdXepzx0aXzBxCgU3emekL7cE7G4mo7TPb /u/WZ4GvhudjjrF96IisIlecFFou X-Google-Smtp-Source: AHgI3IaaCLDt2iene0Q22wCjmRW+B2Qd4f1BZeNyL7cuqyWAWVkeYoGv4Bdu6ngL2g3jleSS3vvoWw== X-Received: by 2002:a5d:4512:: with SMTP id s18mr4917323wrq.182.1549390529689; Tue, 05 Feb 2019 10:15:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 19:14:12 +0100 Message-Id: <1549390526-24246-3-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1549390526-24246-1-git-send-email-pbonzini@redhat.com> References: <1549390526-24246-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::432 Subject: [Qemu-devel] [PULL 02/76] 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