From: Kangjie Xu <kangjie.xu@linux.alibaba.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, jasowang@redhat.com, hengqi@linux.alibaba.com,
xuanzhuo@linux.alibaba.com
Subject: [PATCH 00/16] Support VIRTIO_F_RING_RESET for virtio-net and vhost-user in virtio pci
Date: Mon, 18 Jul 2022 19:16:57 +0800 [thread overview]
Message-ID: <cover.1658141552.git.kangjie.xu@linux.alibaba.com> (raw)
The virtio queue reset function has already been defined in the virtio spec 1.2.
The relevant virtio spec information is here:
https://github.com/oasis-tcs/virtio-spec/issues/124
https://github.com/oasis-tcs/virtio-spec/issues/139
This patch set is to support this function in QEMU. It consists of two parts: virtio-net
and vhost-user. The patches 1-7 are the implementation for virtio-net and the patches
8-16 are for vhost-user.
The process of virt queue reset can be concluded as:
1. The virtqueue is disabled when VIRTIO_PCI_COMMON_Q_RESET is written.
2. Then the virtqueue is restarted after the information of vrings is passed to QEMU and
VIRTIO_PCI_COMMON_Q_ENABLE is written.
Test environment:
Host: 5.4.189
Qemu: QEMU emulator version 7.0.50
Guest: 5.19.0-rc3 (With vq reset support)
DPDK: 22.07-rc1 (With vq reset support)
Test Cmd: ethtool -g eth1; ethtool -G eth1 rx $1 tx $2; ethtool -g eth1;
The frontend can resize the virtio queue, then virtio queue reset function should
be triggered.
The default is split mode, modify Qemu virtio-net to add PACKED feature to
test packed mode.
Guest Kernel Patch:
https://lore.kernel.org/bpf/20220629065656.54420-1-xuanzhuo@linux.alibaba.com/
DPDK Code:
https://github.com/middaywords/dpdk/commit/098c8e1dfae10b747da8dd8950a82890efca7bee
Please review. Thanks.
Kangjie Xu (9):
vhost: add op to enable or disable a single vring
vhost-user: enable/disable a single vring
vhost: extract the logic of unmapping the vrings and desc
vhost: introduce restart and release for vhost_dev's vqs
vhost-net: introduce restart and stop for vhost_net's vqs
virtio: introduce queue_enable in virtio
virtio-net: support queue_enable for vhost-user
virtio-net: support queue_reset for vhost-user
vhost-net: vq reset feature bit support
Xuan Zhuo (7):
virtio-pci: virtio_pci_common_cfg add queue_notify_data
virtio: add VIRTIO_F_RING_RESET
virtio: pci: virtio_pci_common_cfg add queue_reset
virtio: introduce __virtio_queue_reset()
virtio: introduce virtio_queue_reset()
virtio-pci: support queue reset
virtio-net: support queue reset
hw/net/vhost_net.c | 56 ++++++++++++++++++
hw/net/virtio-net.c | 40 +++++++++++++
hw/virtio/vhost-user.c | 55 +++++++++++++++---
hw/virtio/vhost.c | 49 ++++++++++++++--
hw/virtio/virtio-pci.c | 17 ++++++
hw/virtio/virtio.c | 57 +++++++++++++------
include/hw/virtio/vhost-backend.h | 4 ++
include/hw/virtio/vhost.h | 6 ++
include/hw/virtio/virtio-pci.h | 1 +
include/hw/virtio/virtio.h | 4 ++
include/net/vhost_net.h | 5 ++
.../standard-headers/linux/virtio_config.h | 5 ++
include/standard-headers/linux/virtio_pci.h | 4 ++
13 files changed, 274 insertions(+), 29 deletions(-)
--
2.32.0
next reply other threads:[~2022-07-18 13:54 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 11:16 Kangjie Xu [this message]
2022-07-18 11:16 ` [PATCH 01/16] virtio-pci: virtio_pci_common_cfg add queue_notify_data Kangjie Xu
2022-07-26 3:17 ` Jason Wang
2022-07-26 6:16 ` Kangjie Xu
2022-07-18 11:16 ` [PATCH 02/16] virtio: add VIRTIO_F_RING_RESET Kangjie Xu
2022-07-18 11:17 ` [PATCH 03/16] virtio: pci: virtio_pci_common_cfg add queue_reset Kangjie Xu
2022-07-18 11:17 ` [PATCH 04/16] virtio: introduce __virtio_queue_reset() Kangjie Xu
2022-07-26 3:20 ` Jason Wang
2022-07-18 11:17 ` [PATCH 05/16] virtio: introduce virtio_queue_reset() Kangjie Xu
2022-07-26 3:21 ` Jason Wang
2022-07-18 11:17 ` [PATCH 06/16] virtio-pci: support queue reset Kangjie Xu
2022-07-26 3:31 ` Jason Wang
2022-07-18 11:17 ` [PATCH 07/16] virtio-net: " Kangjie Xu
2022-07-26 3:43 ` Jason Wang
2022-07-26 7:01 ` Kangjie Xu
2022-07-27 5:00 ` Jason Wang
2022-07-27 6:23 ` Kangjie Xu
2022-07-27 6:59 ` Jason Wang
2022-07-27 7:12 ` Kangjie Xu
2022-07-18 11:17 ` [PATCH 08/16] vhost: add op to enable or disable a single vring Kangjie Xu
2022-07-26 3:49 ` Jason Wang
2022-07-26 6:39 ` Kangjie Xu
2022-07-27 4:55 ` Jason Wang
2022-07-27 7:05 ` Kangjie Xu
2022-07-28 2:41 ` Jason Wang
2022-07-29 1:51 ` Kangjie Xu
2022-07-18 11:17 ` [PATCH 09/16] vhost-user: enable/disable " Kangjie Xu
2022-07-26 4:07 ` Jason Wang
2022-07-26 5:27 ` Kangjie Xu
2022-07-27 4:51 ` Jason Wang
2022-07-27 6:44 ` Kangjie Xu
2022-07-18 11:17 ` [PATCH 10/16] vhost: extract the logic of unmapping the vrings and desc Kangjie Xu
2022-07-26 4:07 ` Jason Wang
2022-07-18 11:17 ` [PATCH 11/16] vhost: introduce restart and release for vhost_dev's vqs Kangjie Xu
2022-07-26 4:13 ` Jason Wang
2022-07-26 6:15 ` Kangjie Xu
[not found] ` <f28d29ac-f244-a523-ed78-84c438d13340@linux.alibaba.com>
[not found] ` <CACGkMEtxXSm8Qc1LpKJJYm9cQ-F+eU5Lqecr62maRPxq1tM5rg@mail.gmail.com>
2022-07-27 8:23 ` Kangjie Xu
2022-07-18 11:17 ` [PATCH 12/16] vhost-net: introduce restart and stop for vhost_net's vqs Kangjie Xu
2022-07-26 4:16 ` Jason Wang
2022-07-26 6:11 ` Kangjie Xu
2022-07-18 11:17 ` [PATCH 13/16] virtio: introduce queue_enable in virtio Kangjie Xu
2022-07-26 4:17 ` Jason Wang
2022-07-26 6:19 ` Kangjie Xu
2022-07-18 11:17 ` [PATCH 14/16] virtio-net: support queue_enable for vhost-user Kangjie Xu
2022-07-26 4:25 ` Jason Wang
2022-07-26 6:54 ` Kangjie Xu
2022-07-27 4:58 ` Jason Wang
2022-07-18 11:17 ` [PATCH 15/16] virtio-net: support queue_reset " Kangjie Xu
2022-07-18 11:17 ` [PATCH 16/16] vhost-net: vq reset feature bit support Kangjie Xu
2022-07-26 4:28 ` Jason Wang
2022-07-26 6:24 ` Kangjie Xu
2022-07-27 4:53 ` Jason Wang
2022-07-27 6:48 ` Kangjie Xu
2022-07-25 2:34 ` [PATCH 00/16] Support VIRTIO_F_RING_RESET for virtio-net and vhost-user in virtio pci Kangjie Xu
2022-07-25 3:29 ` Jason Wang
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=cover.1658141552.git.kangjie.xu@linux.alibaba.com \
--to=kangjie.xu@linux.alibaba.com \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xuanzhuo@linux.alibaba.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 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).