DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Ladi Prosek <lprosek@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 0/4] Vhost: fix mq=on but VIRTIO_NET_F_MQ not negotiated
Date: Mon, 4 Dec 2017 15:48:52 +0100	[thread overview]
Message-ID: <20185de0-3f19-b1a1-4887-3d89c4cafe44@redhat.com> (raw)
In-Reply-To: <CABdb737u-dBvxTfOq2=kEUBrBAweASF85QQfbniYPDaZotN-Bw@mail.gmail.com>



On 12/04/2017 03:27 PM, Ladi Prosek wrote:
> On Mon, Dec 4, 2017 at 3:08 PM, Maxime Coquelin
> <maxime.coquelin@redhat.com>  wrote:
>> 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.
> The destroyed queue pairs will be re-created when an MQ-enabled driver
> takes over later on, though, is that correct?

Correct! When the new driver registers, QEMU sends
VHOST_USER_SET_VRING_ENABLE requests to all queues in order to enable
only the first queue pair, disabling all others queue pairs.

In QEMU, see virtio_net_set_queues() in hw/net/virtio-net.c

> iPXE and OVMF virtio-net drivers will typically not be the last ones
> driving the device. They will likely load an OS equipped with a driver
> that negotiates the MQ feature. Thanks!
Maxime

      reply	other threads:[~2017-12-04 14:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 14:08 Maxime Coquelin
2017-12-04 14:08 ` [dpdk-dev] [PATCH 1/4] vhost: prevent features to be changed while device is running Maxime Coquelin
2017-12-04 14:17   ` Ladi Prosek
2017-12-04 14:20     ` Maxime Coquelin
2017-12-04 14:08 ` [dpdk-dev] [PATCH 2/4] vhost: propagate VHOST_USER_SET_FEATURES handling error Maxime Coquelin
2017-12-04 14:08 ` [dpdk-dev] [PATCH 3/4] vhost: extract virtqueue cleaning and freeing functions Maxime Coquelin
2017-12-04 14:09 ` [dpdk-dev] [PATCH 4/4] vhost: destroy unused virtqueues when multiqueue not negotiated Maxime Coquelin
2017-12-04 14:27 ` [dpdk-dev] [PATCH 0/4] Vhost: fix mq=on but VIRTIO_NET_F_MQ " Ladi Prosek
2017-12-04 14:48   ` Maxime Coquelin [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=20185de0-3f19-b1a1-4887-3d89c4cafe44@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jianfeng.tan@intel.com \
    --cc=lersek@redhat.com \
    --cc=lprosek@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).