From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 1C5752B95 for ; Thu, 26 Jul 2018 17:48:11 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8F17521D37; Thu, 26 Jul 2018 11:48:10 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 26 Jul 2018 11:48:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=0eUAJ++3kKtM4badORHhLEjQ+r 6WbvwijfQaJWkG9yU=; b=PHSUkoYoSYyRvAeU0yZWXRo2ZieCf8YEC2TQ96MnFQ f5wYTFi3l0x0rUoloj+S/xvbYAgf3iMLHByv828pEdKgQd3aIIUtolNOTDy0zITk wNwyLzQMPo/1mQ6fxtu5ovlaacmfKB2fTCXf05/MBwH17foGfcaJFDV6m1zqm8Nl Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=0eUAJ+ +3kKtM4badORHhLEjQ+r6WbvwijfQaJWkG9yU=; b=O4tOXJ3iArfYJosEw+f3j7 3+tDyh7EdT65RnRyg5OYE5scPoev+EupNTx9Dcm661awoBBkdPz7zMH5GA6zWRuB PtjD/zDimkODvFeDWJCU8ZnTYOIL6FC5kTqclKZbFx2vt4t4cToFa9c3l1g/u6MG OSSAAsOdVxshM60zUV92BrkSvYBizkIFgMfEWQt8hhy6oe0orph9dAWrNk50K0/v G+dhx2ztn7euquBtZky1mLBIR8Wm52BY2y3xbj58v1W9kDC3RZt/pyjDHeLAJ/So z2BLP2NfA+fww0iHOzAI7+OHnErLQLrytd1swUzwkQ8eqk8avgQKCvSkB7jeiUlQ == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id DE02F10278; Thu, 26 Jul 2018 11:48:08 -0400 (EDT) From: Thomas Monjalon To: maxime.coquelin@redhat.com, tiwei.bie@intel.com Cc: dev@dpdk.org, "Kulasek, TomaszX" , "yliu@fridaylinux.org" , "Liu, Changpeng" Date: Thu, 26 Jul 2018 17:48:04 +0200 Message-ID: <30052203.PRpXP6jO5E@xps> In-Reply-To: References: <20180209173455.14116-1-tomaszx.kulasek@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] vhost: fix wait for valid descriptor 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: Thu, 26 Jul 2018 15:48:11 -0000 What is the status of this patch? 11/02/2018 05:21, Tan, Jianfeng: > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Kulasek > > Sent: Saturday, February 10, 2018 1:35 AM > > To: yliu@fridaylinux.org > > Cc: dev@dpdk.org; yuanhan.liu@linux.intel.com; stable@dpdk.org; Liu, > > Changpeng > > Subject: [dpdk-dev] [PATCH] vhost: fix wait for valid descriptor > > > > For each virt queue's kickfd and callfd, there are 2 invalid > > status: VIRTIO_UNINITIALIZED_EVENTFD and VIRTIO_INVALID_EVENTFD. > > Don't set the virt queue to ready status until got the valid > > descriptor. > > Cannot remember why we introduce two invalid status. > > If we treat "VIRTIO_INVALID_EVENTFD" as an indicator to judge if device is ready, then defining one status (invalid) is enough. > > Thanks, > Jianfeng > > > > > This is safe for polling mode drivers in Guest OS, the backend > > vhost process will not post notification to interrupt vector for > > PMD mode in guest, but the interrupt vector still valid. > > > > Fixes: e049ca6d10e0 ("vhost-user: prepare multiple queue setup") > > Cc: yuanhan.liu@linux.intel.com > > Cc: stable@dpdk.org > > > > Signed-off-by: Changpeng Liu > > Signed-off-by: Tomasz Kulasek > > --- > > lib/librte_vhost/vhost_user.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > > index 65ee33919..4508f697b 100644 > > --- a/lib/librte_vhost/vhost_user.c > > +++ b/lib/librte_vhost/vhost_user.c > > @@ -766,7 +766,9 @@ vq_is_ready(struct vhost_virtqueue *vq) > > { > > return vq && vq->desc && vq->avail && vq->used && > > vq->kickfd != VIRTIO_UNINITIALIZED_EVENTFD && > > - vq->callfd != VIRTIO_UNINITIALIZED_EVENTFD; > > + vq->callfd != VIRTIO_UNINITIALIZED_EVENTFD && > > + vq->kickfd != VIRTIO_INVALID_EVENTFD && > > + vq->callfd != VIRTIO_INVALID_EVENTFD; > > } > > > > static int > > -- > > 2.14.1 >