All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Xu <wexu@redhat.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>
Cc: qemu-devel@nongnu.org, tiwei.bie@intel.com, jasowang@redhat.com,
	mst@redhat.com, jfreimann@redhat.com
Subject: Re: [Qemu-devel] [PATCH v1 00/16] packed ring virtio-net backend support
Date: Fri, 23 Nov 2018 13:57:37 +0800	[thread overview]
Message-ID: <20181123055737.GA8087@wei-ubt> (raw)
In-Reply-To: <2a4aa88d-37ce-7b9e-14c9-238b1e0ffd5c@redhat.com>

On Thu, Nov 22, 2018 at 06:57:31PM +0100, Maxime Coquelin wrote:
> Hi Wei,
> 
> I just tested your series with Tiwei's v3, and it fails
> with ctrl vq enabled:
> qemu-system-x86_64: virtio-net ctrl missing headers

OK, I haven't tried Tiwei's v3 yet, will give it a try.

Wei

> 
> Regards,
> Maxime
> 
> On 11/22/18 3:06 PM, wexu@redhat.com wrote:
> >From: Wei Xu <wexu@redhat.com>
> >
> >Code base:
> >     https://github.com/Whishay/qemu.git
> >
> >rfc v3 -> v1
> >- migration support for both userspace and vhost-net, need tweak vhost
> >   ioctl() to make it work(the code is pasted in the commit message of
> >   vhost migration patch #13).
> >
> >Note:
> >   the high 32-bit guest feature bit is saved as a subsection for
> >   virtio devices which makes packed ring feature bit check unusable when
> >   loading the saved per-queue variables(this is done before loading
> >   subsection which is the last action for device during migration),
> >   so I save and load all the things generally for now, any idea to fix this?
> >
> >- Fixed comments from Jason for rfc v3 sorted by patch #, two comments I
> >   didn't take were(from patch) listed here:
> >09: - introduce new API(virtqueue_fill_n()).
> >       - Didn't take it since userspace backend does not support batching,
> >         so only one element is popped and current API should be enough.
> >06 & 07: Refactor split and packed pop()/get_avail_bytes().
> >          - the duplicated code interwined with split/packed ring specific
> >            things and it might make it unclear, so I only extracted the few
> >            common parts out side rcu and keep the others separate.
> >
> >The other revised comments:
> >02: - reuse current 'avail/used' for 'driver/device' in VRingMemoryRegionCache.
> >     - remove event_idx since shadow_avail_idx works.
> >03: - move size recalculation to a separate patch.
> >     - keep 'avail/used' in current calculation function name.
> >     - initialize 'desc' memory region as 'false' for 1.0('true' for 1.1)
> >04: - delete 'event_idx'
> >05: - rename 'wc' to wrap_counter.
> >06: - converge common part outside rcu section for 1.0/1.1.
> >     - move memory barrier for the first 'desc' in between checking flag
> >       and read other fields.
> >     - remove unnecessary memory barriers for indirect descriptors.
> >     - no need to destroy indirect memory cache since it is generally done
> >       before return from the function.
> >     - remove redundant maximum chained descriptors limitation check.
> >     - there are some differences(desc name, wrap idx/counter, flags) between
> >       split and packed rings, so keep them separate for now.
> >     - amend the comment when recording index and wrap counter for a kick
> >       from guest.
> >07: - calculate fields in descriptor instead of read it when filling.
> >     - put memory barrier correctly before filling the flags in descriptor.
> >     - replace full memory barrier with a write barrier in fill.
> >     - shift to read descriptor flags and descriptor necessarily and
> >       separately in packed_pop().
> >     - correct memory barrier in packed_pop() as in packed_fill().
> >08: - reuse 'shadow_avail_idx' instead of adding a new 'event_idx'.
> >     - use the compact and verified vring_packed_need_event()
> >       version for vhost net/user.
> >12: - remove the odd cherry-pick comment.
> >     - used bit '15' for wrap_counters.
> >
> >rfc v2->v3
> >- addressed performance issue
> >- fixed feedback from v2
> >
> >rfc v1->v2
> >- sync to tiwei's v5
> >- reuse memory cache function with 1.0
> >- dropped detach patch and notification helper(04 & 05 in v1)
> >- guest virtio-net driver unload/reload support
> >- event suppression support(not tested)
> >- addressed feedback from v1
> >
> >Wei Xu (15):
> >   virtio: introduce packed ring definitions
> >   virtio: redefine structure & memory cache for packed ring
> >   virtio: expand offset calculation for packed ring
> >   virtio: add memory region init for packed ring
> >   virtio: init wrap counter for packed ring
> >   virtio: init and desc empty check for packed ring
> >   virtio: get avail bytes check for packed ring
> >   virtio: fill/flush/pop for packed ring
> >   virtio: event suppression support for packed ring
> >   virtio-net: fill head desc after done all in a chain
> >   virtio: add userspace migration of packed ring
> >   virtio: add vhost-net migration of packed ring
> >   virtio: packed ring feature bit for userspace backend
> >   vhost: enable packed ring
> >   virtio: enable packed ring via a new command line
> >
> >  VERSION                                        |   2 +-
> >  hw/net/vhost_net.c                             |   2 +
> >  hw/net/virtio-net.c                            |  11 +-
> >  hw/virtio/virtio.c                             | 756 +++++++++++++++++++++++--
> >  include/hw/virtio/virtio.h                     |   8 +-
> >  include/standard-headers/linux/virtio_config.h |  15 +
> >  include/standard-headers/linux/virtio_ring.h   |  43 ++
> >  7 files changed, 783 insertions(+), 54 deletions(-)
> >

  reply	other threads:[~2018-11-23  5:59 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 14:06 [Qemu-devel] [PATCH v1 00/16] packed ring virtio-net backend support wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 01/16] Update version for v3.1.0-rc2 release wexu
2018-11-22 14:31   ` Wei Xu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 02/16] virtio: introduce packed ring definitions wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 03/16] virtio: redefine structure & memory cache for packed ring wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 04/16] virtio: expand offset calculation " wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 05/16] virtio: add memory region init " wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 06/16] virtio: init wrap counter " wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 07/16] virtio: init and desc empty check " wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 08/16] virtio: get avail bytes " wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 09/16] virtio: fill/flush/pop " wexu
2018-11-30 12:45   ` Maxime Coquelin
2019-01-16 17:46     ` Wei Xu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 10/16] virtio: event suppression support " wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 11/16] virtio-net: fill head desc after done all in a chain wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 12/16] virtio: add userspace migration of packed ring wexu
2018-11-22 14:45   ` Jason Wang
2019-01-16 17:50     ` Wei Xu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 13/16] virtio: add vhost-net " wexu
2018-11-28 10:05   ` Maxime Coquelin
2018-11-28 10:34   ` Maxime Coquelin
2019-01-16 17:48     ` Wei Xu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 14/16] virtio: packed ring feature bit for userspace backend wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 15/16] vhost: enable packed ring wexu
2018-11-22 14:06 ` [Qemu-devel] [PATCH v1 16/16] virtio: enable packed ring via a new command line wexu
2018-11-22 17:57 ` [Qemu-devel] [PATCH v1 00/16] packed ring virtio-net backend support Maxime Coquelin
2018-11-23  5:57   ` Wei Xu [this message]
2018-11-25 13:59     ` Wei Xu
2018-11-23  6:45 ` no-reply
2018-11-23  6:45 ` no-reply

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=20181123055737.GA8087@wei-ubt \
    --to=wexu@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jfreimann@redhat.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tiwei.bie@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.