From: Ladi Prosek <lprosek@redhat.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: dev@dpdk.org, yliu@fridaylinux.org, tiwei.bie@intel.com,
jianfeng.tan@intel.com, Laszlo Ersek <lersek@redhat.com>
Subject: Re: [dpdk-dev] [PATCH v3 0/4] Vhost: fix mq=on but VIRTIO_NET_F_MQ not negotiated
Date: Wed, 6 Dec 2017 13:25:42 +0100 [thread overview]
Message-ID: <CABdb735gSWPL0Nat8DSgfQAsMA-nz8R8u+EY=50_Sd3JAkXJdg@mail.gmail.com> (raw)
In-Reply-To: <20171206092048.3568-1-maxime.coquelin@redhat.com>
On Wed, Dec 6, 2017 at 10:20 AM, Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
> Hi,
>
> This third revision reworks the VQs destruction loop to fixes the
> of-by-one error reported by Laszlo.
>
> Having QEMU started with mq=on but guest driver not negotiating
> VIRTIO_NET_F_MQ feature ends up in the vhost device to never
> start. Indeed, more queues are created in the vhost backend than
> configured.
>
> Guest drivers known to not advertise the VIRTIO_NET_F_MQ feature are
> iPXE and OVMF Virtio-net drivers.
>
> Queues are created because before starting the guest, QEMU sends
> VHOST_USER_SET_VRING_CALL requests for all queues declared in QEMU
> command line. Also, once Virtio features negotiated, QEMU sends
> VHOST_USER_SET_VRING_ENABLE requests to disable all but the first
> queue pair.
>
> This series fixes this by destroying all but first queue pair in
> the backend if VIRTIO_NET_F_MQ isn't negotiated. First patches
> makes sure that VHOST_USER_SET_FEATURES request doesn't change
> Virtio features while the device is running, which should never
> happen as per the Virtio spec. This helps to make sure vitqueues
> aren't destroyed while being processed, but also protect from
> other illegal features changes (e.g. VIRTIO_NET_F_MRG_RXBUF).
>
>
> Changes since v2:
> =================
> - Patch 2: Rework & fix VQs destruction loop (Laszlo)
> Changes since v1:
> =================
> - Patch 1: shift bits in the right direction (Ladi)
>
> Maxime Coquelin (4):
> vhost: prevent features to be changed while device is running
> vhost: propagate VHOST_USER_SET_FEATURES handling error
> vhost: extract virtqueue cleaning and freeing functions
> vhost: destroy unused virtqueues when multiqueue not negotiated
>
> lib/librte_vhost/vhost.c | 22 ++++++++++++----------
> lib/librte_vhost/vhost.h | 3 +++
> lib/librte_vhost/vhost_user.c | 39 +++++++++++++++++++++++++++++++++++++--
> 3 files changed, 52 insertions(+), 12 deletions(-)
I have verified that it fixes iPXE and that a full-featured virtio-net
driver successfully takes over the device using all queues. Haven't
tested OVMF but it should be safe to assume that it's fixed as well.
Tested-by: Ladi Prosek <lprosek@redhat.com>
Thank you!
Ladi
prev parent reply other threads:[~2017-12-06 12:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 9:20 Maxime Coquelin
2017-12-06 9:20 ` [dpdk-dev] [PATCH v3 1/4] vhost: prevent features to be changed while device is running Maxime Coquelin
2017-12-07 8:08 ` Tiwei Bie
2017-12-07 8:39 ` Maxime Coquelin
2017-12-07 10:29 ` Tiwei Bie
2017-12-06 9:20 ` [dpdk-dev] [PATCH v3 2/4] vhost: propagate VHOST_USER_SET_FEATURES handling error Maxime Coquelin
2017-12-06 9:20 ` [dpdk-dev] [PATCH v3 3/4] vhost: extract virtqueue cleaning and freeing functions Maxime Coquelin
2017-12-06 9:20 ` [dpdk-dev] [PATCH v3 4/4] vhost: destroy unused virtqueues when multiqueue not negotiated Maxime Coquelin
2017-12-06 11:40 ` [dpdk-dev] [PATCH v3 0/4] Vhost: fix mq=on but VIRTIO_NET_F_MQ " Laszlo Ersek
2017-12-06 12:25 ` Ladi Prosek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABdb735gSWPL0Nat8DSgfQAsMA-nz8R8u+EY=50_Sd3JAkXJdg@mail.gmail.com' \
--to=lprosek@redhat.com \
--cc=dev@dpdk.org \
--cc=jianfeng.tan@intel.com \
--cc=lersek@redhat.com \
--cc=maxime.coquelin@redhat.com \
--cc=tiwei.bie@intel.com \
--cc=yliu@fridaylinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).