From nobody Sat Feb 7 10:15:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@gnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@gnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506971957870313.4924728029033; Mon, 2 Oct 2017 12:19:17 -0700 (PDT) Received: from localhost ([::1]:53837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dz6FE-0003uy-6g for importer@patchew.org; Mon, 02 Oct 2017 15:19:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dz6Bi-0001fq-L2 for qemu-devel@nongnu.org; Mon, 02 Oct 2017 15:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dz6Bg-0000OW-5T for qemu-devel@nongnu.org; Mon, 02 Oct 2017 15:15:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60548) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dz6Bf-0000Nm-Vf for qemu-devel@nongnu.org; Mon, 02 Oct 2017 15:15:32 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0C2F14ACBB for ; Mon, 2 Oct 2017 19:15:31 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-189.ams2.redhat.com [10.36.117.189]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0AA3960E3B; Mon, 2 Oct 2017 19:15:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0C2F14ACBB Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dgilbert@redhat.com From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, mst@redhat.com, marcandre.lureau@redhat.com, maxime.coquelin@redhat.com Date: Mon, 2 Oct 2017 20:15:18 +0100 Message-Id: <20171002191521.15748-2-dgilbert@redhat.com> In-Reply-To: <20171002191521.15748-1-dgilbert@redhat.com> References: <20171002191521.15748-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 02 Oct 2017 19:15:31 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/4] libvhost-user: vu_queue_started X-BeenThere: qemu-devel@gnu.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@gnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Add a vu_queue_started method to complement vu_queue_enabled. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Marc-Andr=C3=A9 Lureau --- contrib/libvhost-user/libvhost-user.c | 6 ++++++ contrib/libvhost-user/libvhost-user.h | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/= libvhost-user.c index d27d6303db..5ee8483a32 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -943,6 +943,12 @@ vu_queue_enabled(VuDev *dev, VuVirtq *vq) return vq->enable; } =20 +bool +vu_queue_started(const VuDev *dev, const VuVirtq *vq) +{ + return vq->started; +} + static inline uint16_t vring_avail_flags(VuVirtq *vq) { diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/= libvhost-user.h index 4021f1124e..94d7cc8fbd 100644 --- a/contrib/libvhost-user/libvhost-user.h +++ b/contrib/libvhost-user/libvhost-user.h @@ -335,6 +335,15 @@ void vu_queue_set_notification(VuDev *dev, VuVirtq *vq= , int enable); bool vu_queue_enabled(VuDev *dev, VuVirtq *vq); =20 /** + * vu_queue_started: + * @dev: a VuDev context + * @vq: a VuVirtq queue + * + * Returns: whether the queue is started. + */ +bool vu_queue_started(const VuDev *dev, const VuVirtq *vq); + +/** * vu_queue_empty: * @dev: a VuDev context * @vq: a VuVirtq queue --=20 2.13.6