From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH v5 03/15] vhost: vring address setup for packed queues Date: Sun, 1 Jul 2018 11:58:38 +0200 Message-ID: <545564d3-2ff6-d07a-6bcd-ab546347512e@redhat.com> References: <20180622134327.18973-1-maxime.coquelin@redhat.com> <20180622134327.18973-4-maxime.coquelin@redhat.com> <20180629155929.GC31010@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: zhihong.wang@intel.com, jfreimann@redhat.com, dev@dpdk.org, mst@redhat.com, jasowang@redhat.com, wexu@redhat.com, Yuanhan Liu , Jens Freimann To: Tiwei Bie 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) In-Reply-To: <20180629155929.GC31010@debian> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.