From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 15402A10 for ; Tue, 14 Mar 2017 13:38:05 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E5586AAC7; Tue, 14 Mar 2017 12:38:05 +0000 (UTC) Received: from [10.36.116.175] (ovpn-116-175.ams2.redhat.com [10.36.116.175]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D5A92D655; Tue, 14 Mar 2017 12:38:03 +0000 (UTC) To: Yuanhan Liu , dev@dpdk.org References: <1488534682-3494-1-git-send-email-yuanhan.liu@linux.intel.com> <1488534682-3494-12-git-send-email-yuanhan.liu@linux.intel.com> Cc: Harris James R , Liu Changpeng From: Maxime Coquelin Message-ID: <08bd20dc-9b92-70ad-1225-7feb042bf81e@redhat.com> Date: Tue, 14 Mar 2017 13:37:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1488534682-3494-12-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 14 Mar 2017 12:38:05 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH 11/17] vhost: move the device ready check at proper place 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: Tue, 14 Mar 2017 12:38:05 -0000 On 03/03/2017 10:51 AM, Yuanhan Liu wrote: > Currently, we check vq->desc, vq->kickfd and vq->callfd to know whether > a virtio device is ready or not. However, we only do it when handling > SET_VRING_KICK message, which could be wrong if a vhost-user frontend > send SET_VRING_KICK first and SET_VRING_CALL later. > > To work for all possible vhost-user frontend implementations, we could > move the ready check at the end of vhost-user message handler. > > Meanwhile, since we do the check more often than before, the "virtio > not ready" message is dropped, to not flood the screen. > > Signed-off-by: Yuanhan Liu > --- > lib/librte_vhost/vhost_user.c | 32 ++++++++++++++------------------ > 1 file changed, 14 insertions(+), 18 deletions(-) Makes sense: Reviewed-by: Maxime Coquelin Thanks, Maxime