From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id C5CCCA00E6 for ; Wed, 17 Apr 2019 09:32:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D71A41B504; Wed, 17 Apr 2019 09:32:26 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 05DB21B4EE; Wed, 17 Apr 2019 09:32:25 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50D2B30ADBB4; Wed, 17 Apr 2019 07:32:25 +0000 (UTC) Received: from [10.36.112.28] (ovpn-112-28.ams2.redhat.com [10.36.112.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 291CE5D71A; Wed, 17 Apr 2019 07:32:18 +0000 (UTC) To: Ilya Maximets , dev@dpdk.org Cc: Tiwei Bie , Jens Freimann , David Marchand , stable@dpdk.org References: <20190412130949.14299-1-i.maximets@samsung.com> From: Maxime Coquelin Message-ID: Date: Wed, 17 Apr 2019 09:32:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190412130949.14299-1-i.maximets@samsung.com> Content-Type: text/plain; charset="UTF-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 17 Apr 2019 07:32:25 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] vhost: fix silent queue enabling with legacy guests 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" Message-ID: <20190417073215.TBmXqe5UnLWt3nDuumSo5Ho9I93kC2C9xSynX8j9ZbU@z> On 4/12/19 3:09 PM, Ilya Maximets wrote: > vhost should notify the application in case of all vring state changes. > > In general, application should not care about negotiation of > VHOST_USER_F_PROTOCOL_FEATURES. Protocol details like this should > be hidden by the vhost library. > > With this patch applications like OVS will be able to assume that > all vrings disabled by default and only process 'vring_state_changed' > events. > > Fixes: 321203a54ba7 ("vhost: enable rings at the right time") > Cc: stable@dpdk.org > > Signed-off-by: Ilya Maximets > --- > lib/librte_vhost/vhost_user.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > index 23beed97d..c9e29ece8 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -1231,8 +1231,12 @@ vhost_user_set_vring_kick(struct virtio_net **pdev, struct VhostUserMsg *msg, > * the ring starts already enabled. Otherwise, it is enabled via > * the SET_VRING_ENABLE message. > */ > - if (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) > + if (!(dev->features & (1ULL << VHOST_USER_F_PROTOCOL_FEATURES))) { > vq->enabled = 1; > + if (dev->notify_ops->vring_state_changed) > + dev->notify_ops->vring_state_changed( > + dev->vid, file.index, 1); > + } > > if (vq->kickfd >= 0) > close(vq->kickfd); > Nice, this is indeed the right thing to do: Reviewed-by: Maxime Coquelin Thanks, Maxime