From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 2C4EE1B8B6 for ; Sun, 1 Jul 2018 11:58:45 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 31A6B7B2B1; Sun, 1 Jul 2018 09:58:44 +0000 (UTC) Received: from [10.36.112.10] (unknown [10.36.112.10]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33E412156880; Sun, 1 Jul 2018 09:58:42 +0000 (UTC) To: Tiwei Bie Cc: zhihong.wang@intel.com, jfreimann@redhat.com, dev@dpdk.org, mst@redhat.com, jasowang@redhat.com, wexu@redhat.com, Yuanhan Liu , Jens Freimann References: <20180622134327.18973-1-maxime.coquelin@redhat.com> <20180622134327.18973-4-maxime.coquelin@redhat.com> <20180629155929.GC31010@debian> From: Maxime Coquelin Message-ID: <545564d3-2ff6-d07a-6bcd-ab546347512e@redhat.com> Date: Sun, 1 Jul 2018 11:58:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180629155929.GC31010@debian> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 01 Jul 2018 09:58:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Sun, 01 Jul 2018 09:58:44 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH v5 03/15] vhost: vring address setup for packed queues 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: , X-List-Received-Date: Sun, 01 Jul 2018 09:58:45 -0000 On 06/29/2018 05:59 PM, Tiwei Bie wrote: > @@ -888,7 +914,8 @@ vhost_user_set_mem_table(struct virtio_net **pdev, struct VhostUserMsg *pmsg) > static int > vq_is_ready(struct vhost_virtqueue *vq) > { > - return vq && vq->desc && vq->avail && vq->used && > + return vq && > + (vq->desc_packed || (vq->desc && vq->avail && vq->used)) && > vq->kickfd != VIRTIO_UNINITIALIZED_EVENTFD && > vq->callfd != VIRTIO_UNINITIALIZED_EVENTFD; It seems that the check is wrong here as desc_packed and desc are in a union. We may have to check whether packed ring has been negotiated.