From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by dpdk.org (Postfix) with ESMTP id 9E2621B1C5 for ; Mon, 5 Feb 2018 11:18:58 +0100 (CET) Received: by mail-wr0-f178.google.com with SMTP id a43so21411375wrc.4 for ; Mon, 05 Feb 2018 02:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=i16f1aUz33TJUDQfbGz8upmadra+qvx6wHx1f8/BUH8=; b=gp+0MlPzaQbCuIYcuN70sD8Mph7nv+7FuVE9ugxWN5FMSOLQaq8lZINYrumAALkmPg 5unNj6j4zHFiGxoods2JEPVtxZyOsi8S96w4YtxBwARTQaUzuATgKFZCk8Pa5eE3WvNN soKsg56GFbA3ENnRMYSqMJmsnSwJUVHGNDBc/YMXmLm8ERrANaLJx2vu6ja+C8UT92xY M7D1XUsJeCvlRqZ7Hx8c8/caLlEBqtSshr+ojf1vp2BZbzUz4D2vNWAkm38Z5oI5smYN o3sZQiOijBYgVHzqIfQIHHO+B6C0WdrLmZpUcD21BBMeofxynoV0la0YMGkHVBtw4OL0 DxBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=i16f1aUz33TJUDQfbGz8upmadra+qvx6wHx1f8/BUH8=; b=P/xcOUW2EqfAMZCG/5U0wCJQXrLmAAvgdH1PiFfuVrXg8AAR+tieNS1d3D8Dphcvcb qsAl2DWpH5jOPxjv3GVuFGw2xkOBXJjbAOAo6VtfLparlRnK26h6A72iMD25dwcXGSMV BHOX8QfQ2m09IKpre11QftYBvYONMUqLCXHEkvd3B9bqneUSXlSqbzBPx3TTXQePygD6 atceTdK2D2pdbbbW61XWtGX/iPHn5O/v//oTn3uFvSHnRMj522+mL7eXkZfLypFAGKK8 Ha0BnlL6jj7j2vdZXQ/B5HvMCyxX7ZZRqoHvaJ0rkuZ5rhUjpJD9KPzcYLh9XPcNtcW2 3TDg== X-Gm-Message-State: AKwxyte/lP4874eh5ftdf1Tx5+TtbvR3HUV3nh8++6pfl1jsgGiSX4ey XoIPorsmhrzYjjKVrvg5bzFpLu2ukQa+aZKwUA== X-Google-Smtp-Source: AH8x227RIjxpEtOemN4HKo/B0vckpue1tH4whDClQI4ti+UxLFowusVLMagO9nZCyRFaNFZOFPaor3y3cmzDFudyLWg= X-Received: by 10.223.138.194 with SMTP id z2mr29772944wrz.230.1517825938341; Mon, 05 Feb 2018 02:18:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.160.174 with HTTP; Mon, 5 Feb 2018 02:18:57 -0800 (PST) In-Reply-To: <3ed0a409-70de-7105-ab00-449f7862b487@redhat.com> References: <1517409743-24332-1-git-send-email-alan.dewar@att.com> <3ed0a409-70de-7105-ab00-449f7862b487@redhat.com> From: Alan Dewar Date: Mon, 5 Feb 2018 10:18:57 +0000 Message-ID: To: Maxime Coquelin Cc: dev@dpdk.org, Alan Dewar Content-Type: text/plain; charset="UTF-8" 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 10:18:58 -0000 Hi Maxime, Just confirming that the commit that you suggested fixes the problem that I was seeing. Many thanks for your help. Regards Alan On Mon, Feb 5, 2018 at 8:42 AM, Maxime Coquelin wrote: > 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