From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26E47A0537; Sat, 25 Jan 2020 09:52:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D98D2316B; Sat, 25 Jan 2020 09:52:32 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id C1B88B55 for ; Sat, 25 Jan 2020 09:52:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579942351; 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; bh=winBzbo5U/hZX3/VJYGREgyLjax6zDFYxzQ3y95BHAs=; b=JsKb6rUE/pKeW/QcPcmQ/2x1urdLNAs3SZMVmfaXT99i9NjE64bISEEhLXYYEv0QRQABpm kX8uCAas+qUZuHL/QWaJe6VECSOlhaxTrX1smXaDgFTypvJOB0wVjb6k3jOddh6LivP958 h9Kxe7vZh1sxvG3O9z08MCdL0vyMFRw= 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-139-Ph-258ojMCWz_wlfy_qJzA-1; Sat, 25 Jan 2020 03:52:28 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 267218017CC; Sat, 25 Jan 2020 08:52:27 +0000 (UTC) Received: from amorenoz.users.ipa.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF5DB60BE1; Sat, 25 Jan 2020 08:52:21 +0000 (UTC) From: Adrian Moreno To: dev@dpdk.org Cc: Zhihong Wang , Maxime Coquelin , Tiwei Bie , Adrian Moreno , yliu@fridaylinux.org, stable@dpdk.org Date: Sat, 25 Jan 2020 09:52:16 +0100 Message-Id: <20200125085216.15226-1-amorenoz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: Ph-258ojMCWz_wlfy_qJzA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-dev] [PATCH] vhost: add event areas to vq_is_ready() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Consider a virtqueue ready when, apart from the the descriptor area, both event supression areas have been mapped. Fixes: 2d1541e2b6b3 ("vhost: add vring address setup for packed queues") Cc: yliu@fridaylinux.org Cc: stable@dpdk.org Signed-off-by: Adrian Moreno --- lib/librte_vhost/vhost_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 69b84a882..c9cc4d648 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1298,7 +1298,8 @@ vq_is_ready(struct virtio_net *dev, struct vhost_virt= queue *vq) =09=09return false; =20 =09if (vq_is_packed(dev)) -=09=09rings_ok =3D !!vq->desc_packed; +=09=09rings_ok =3D vq->desc_packed && vq->driver_event && +=09=09=09vq->device_event; =09else =09=09rings_ok =3D vq->desc && vq->avail && vq->used; =20 --=20 2.21.1