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 263BD1B2DC for ; Mon, 5 Feb 2018 09:42:06 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E1B18046E; Mon, 5 Feb 2018 08:42:06 +0000 (UTC) Received: from [10.36.112.45] (ovpn-112-45.ams2.redhat.com [10.36.112.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 01822177D9; Mon, 5 Feb 2018 08:42:04 +0000 (UTC) To: alangordondewar@gmail.com, dev@dpdk.org Cc: Alan Dewar References: <1517409743-24332-1-git-send-email-alan.dewar@att.com> From: Maxime Coquelin Message-ID: <3ed0a409-70de-7105-ab00-449f7862b487@redhat.com> Date: Mon, 5 Feb 2018 09:42:01 +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: <1517409743-24332-1-git-send-email-alan.dewar@att.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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 05 Feb 2018 08:42:06 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH] vhost: support non multiqueue 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: , X-List-Received-Date: Mon, 05 Feb 2018 08:42:07 -0000 Hi Alan, On 01/31/2018 03:42 PM, alangordondewar@gmail.com wrote: > From: Alan Dewar > > Performance of vhost interfaces can be improved by having multiple > TX/RX queue-pairs. QEMU can be told to use multiple queue-pairs for > a vhost interface when starting the guest VM. The DPDK will also > configure multiple queue-pairs in response to requests from QEMU. > > Later when the guest VM reaches the running state, it can decide to not > support the multiqueue option. This information is passed down from > the guest VM to QEMU, and from QEMU to the DPDK, but the DPDK ignores > it. > > Because the guest VM doesn't support the multiqueue option it will only > initialise the first queue-pair, and in turn the DPDK will not signal > that the vhost interface is up. > > This change allows the DPDK to signal that the vhost interface is up > after only the first queue-pair is fully initialised if the guest VM > does not support the multiqueue option. > > Signed-off-by: Alan Dewar > --- > lib/librte_vhost/vhost.c | 6 +++--- > lib/librte_vhost/vhost_user.c | 8 +++++++- > lib/librte_vhost/virtio_net.c | 12 +++++++++--- > 3 files changed, 19 insertions(+), 7 deletions(-) We already implemented a workaround to fix this issue: commit e29109323595beb3884da58126ebb3b878cb66f5 Author: Maxime Coquelin Date: Wed Dec 13 09:51:09 2017 +0100 vhost: destroy unused virtqueues when multiqueue not negotiated QEMU sends VHOST_USER_SET_VRING_CALL requests for all queues declared in QEMU command line before the guest is started. It has the effect in DPDK vhost-user backend to allocate vrings for all queues declared by QEMU. If the first driver being used does not support multiqueue, the device never changes to VIRTIO_DEV_RUNNING state as only the first queue pair is initialized. One driver impacted by this bug is virtio-net's iPXE driver which does not support VIRTIO_NET_F_MQ feature. It is safe to destroy unused virtqueues in SET_FEATURES request handler, as it is ensured the device is not in running state at this stage, so virtqueues aren't being processed. Signed-off-by: Maxime Coquelin Acked-by: Laszlo Ersek Acked-by: Yuanhan Liu Could you try with latest master and confirm it solves the issue on your side? Cheers, Maxime