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 699AA1B6CC for ; Tue, 30 Jan 2018 18:52:53 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8549E780EA; Tue, 30 Jan 2018 17:52:52 +0000 (UTC) Received: from [10.36.112.22] (ovpn-112-22.ams2.redhat.com [10.36.112.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92E4D608F1; Tue, 30 Jan 2018 17:52:44 +0000 (UTC) To: Stefan Hajnoczi , dev@dpdk.org Cc: Yuanhan Liu , wei.w.wang@intel.com, mst@redhat.com, zhiyong.yang@intel.com, jasowang@redhat.com References: <20180119134444.24927-1-stefanha@redhat.com> <20180119134444.24927-24-stefanha@redhat.com> From: Maxime Coquelin Message-ID: Date: Tue, 30 Jan 2018 18:52:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180119134444.24927-24-stefanha@redhat.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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 30 Jan 2018 17:52:52 +0000 (UTC) Subject: Re: [dpdk-dev] [RFC 23/24] WORKAROUND revert virtio-net mq vring deletion 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, 30 Jan 2018 17:52:53 -0000 Hi Stefan, On 01/19/2018 02:44 PM, Stefan Hajnoczi wrote: > The virtio-net mq vring deletion code should be in virtio_net.c, not in > the generic vhost_user.c code where it breaks non-virtio-net devices. > > Signed-off-by: Stefan Hajnoczi > --- > drivers/librte_vhost/vhost_user.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/librte_vhost/vhost_user.c b/drivers/librte_vhost/vhost_user.c > index a819684b4..08fab933b 100644 > --- a/drivers/librte_vhost/vhost_user.c > +++ b/drivers/librte_vhost/vhost_user.c > @@ -163,6 +163,7 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features) > (dev->features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ? "on" : "off", > (dev->features & (1ULL << VIRTIO_F_VERSION_1)) ? "on" : "off"); > > +#if 0 > if (!(dev->features & (1ULL << VIRTIO_NET_F_MQ))) { > /* > * Remove all but first queue pair if MQ hasn't been > @@ -181,6 +182,7 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features) > free_vq(vq); > } > } > +#endif > > return 0; > } > Thanks for reporting the issue. It seems difficult to move this check in virtio-net.c without a deep rework. But I think we can workaround by ensuring the backend supports VIRTIO_NET_F_MQ, but it has not been negotiated. Something like: if ((vhost_features & (1ULL << VIRTIO_NET_F_MQ)) && !(dev->features & (1ULL << VIRTIO_NET_F_MQ)) { ... } Any thoughts? Thanks, Maxime