[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/22] vhost: rename VHOST_RESET_OWNER to VHOST_RESET
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 12/22] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE |
Date: |
Thu, 24 Sep 2015 16:20:38 +0300 |
From: Yuanhan Liu <address@hidden>
Quote from Michael:
We really should rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE.
Suggested-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Yuanhan Liu <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Yuanhan Liu <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
---
linux-headers/linux/vhost.h | 2 +-
hw/net/vhost_net.c | 2 +-
hw/virtio/vhost-user.c | 6 +++---
tests/vhost-user-test.c | 2 +-
docs/specs/vhost-user.txt | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
index ead86db..14a0160 100644
--- a/linux-headers/linux/vhost.h
+++ b/linux-headers/linux/vhost.h
@@ -78,7 +78,7 @@ struct vhost_memory {
#define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01)
/* Give up ownership, and reset the device to default values.
* Allows subsequent call to VHOST_OWNER_SET to succeed. */
-#define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02)
+#define VHOST_RESET_DEVICE _IO(VHOST_VIRTIO, 0x02)
/* Set up/modify memory layout */
#define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 9d32d76..b7d29b7 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -287,7 +287,7 @@ static void vhost_net_stop_one(struct vhost_net *net,
} else if (net->nc->info->type == NET_CLIENT_OPTIONS_KIND_VHOST_USER) {
for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {
const VhostOps *vhost_ops = net->dev.vhost_ops;
- int r = vhost_ops->vhost_call(&net->dev, VHOST_RESET_OWNER,
+ int r = vhost_ops->vhost_call(&net->dev, VHOST_RESET_DEVICE,
NULL);
assert(r >= 0);
}
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 7fe35c6..9cb2f52 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -32,7 +32,7 @@ typedef enum VhostUserRequest {
VHOST_USER_GET_FEATURES = 1,
VHOST_USER_SET_FEATURES = 2,
VHOST_USER_SET_OWNER = 3,
- VHOST_USER_RESET_OWNER = 4,
+ VHOST_USER_RESET_DEVICE = 4,
VHOST_USER_SET_MEM_TABLE = 5,
VHOST_USER_SET_LOG_BASE = 6,
VHOST_USER_SET_LOG_FD = 7,
@@ -98,7 +98,7 @@ static unsigned long int
ioctl_to_vhost_user_request[VHOST_USER_MAX] = {
VHOST_GET_FEATURES, /* VHOST_USER_GET_FEATURES */
VHOST_SET_FEATURES, /* VHOST_USER_SET_FEATURES */
VHOST_SET_OWNER, /* VHOST_USER_SET_OWNER */
- VHOST_RESET_OWNER, /* VHOST_USER_RESET_OWNER */
+ VHOST_RESET_DEVICE, /* VHOST_USER_RESET_DEVICE */
VHOST_SET_MEM_TABLE, /* VHOST_USER_SET_MEM_TABLE */
VHOST_SET_LOG_BASE, /* VHOST_USER_SET_LOG_BASE */
VHOST_SET_LOG_FD, /* VHOST_USER_SET_LOG_FD */
@@ -222,7 +222,7 @@ static int vhost_user_call(struct vhost_dev *dev, unsigned
long int request,
break;
case VHOST_USER_SET_OWNER:
- case VHOST_USER_RESET_OWNER:
+ case VHOST_USER_RESET_DEVICE:
break;
case VHOST_USER_SET_MEM_TABLE:
diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
index 75fedf0..e301db7 100644
--- a/tests/vhost-user-test.c
+++ b/tests/vhost-user-test.c
@@ -58,7 +58,7 @@ typedef enum VhostUserRequest {
VHOST_USER_GET_FEATURES = 1,
VHOST_USER_SET_FEATURES = 2,
VHOST_USER_SET_OWNER = 3,
- VHOST_USER_RESET_OWNER = 4,
+ VHOST_USER_RESET_DEVICE = 4,
VHOST_USER_SET_MEM_TABLE = 5,
VHOST_USER_SET_LOG_BASE = 6,
VHOST_USER_SET_LOG_FD = 7,
diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
index 70da3b1..ccbbcbb 100644
--- a/docs/specs/vhost-user.txt
+++ b/docs/specs/vhost-user.txt
@@ -194,10 +194,10 @@ Message types
as an owner of the session. This can be used on the Slave as a
"session start" flag.
- * VHOST_USER_RESET_OWNER
+ * VHOST_USER_RESET_DEVICE
Id: 4
- Equivalent ioctl: VHOST_RESET_OWNER
+ Equivalent ioctl: VHOST_RESET_DEVICE
Master payload: N/A
Issued when a new connection is about to be closed. The Master will no
--
MST
- [Qemu-devel] [PULL 03/22] q35: Move options common to all classes to pc_q35_machine_options(), (continued)
- [Qemu-devel] [PULL 03/22] q35: Move options common to all classes to pc_q35_machine_options(), Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 02/22] virtio-net: unbreak self announcement and guest offloads after migration, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 04/22] q35: Move options common to all classes to pc_i440fx_machine_options(), Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 05/22] pc: Introduce pc-*-2.5 machine classes, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 06/22] virtio: ring sizes vs. reset, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 07/22] virtio-ccw: support ring size changes, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 08/22] virtio-ccw: feature bits > 31 handling, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 09/22] virtio-ccw: enable virtio-1, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 10/22] vhost-user: use VHOST_USER_XXX macro for switch statement, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 11/22] vhost-user: add protocol feature negotiation, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 12/22] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 19/22] MAINTAINERS: add more devices to the PCI section, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 21/22] virtio: introduce virtqueue_discard(), Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 22/22] virtio-net: correctly drop truncated packets, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 20/22] virtio: introduce virtqueue_unmap_sg(), Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 14/22] vhost: introduce vhost_backend_get_vq_index method, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 18/22] MAINTAINERS: add more devices to the PC section, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 15/22] vhost-user: add multiple queue support, Michael S. Tsirkin, 2015/09/24
- [Qemu-devel] [PULL 17/22] intel_iommu: Add support for translation for devices behind bridges, Michael S. Tsirkin, 2015/09/24