vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE
Quote from Michael: We really should rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE. Suggested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Tested-by: Marcel Apfelbaum <marcel@redhat.com>
This commit is contained in:
parent
dcb10c000c
commit
d1f8b30ec8
@ -194,10 +194,10 @@ Message types
|
|||||||
as an owner of the session. This can be used on the Slave as a
|
as an owner of the session. This can be used on the Slave as a
|
||||||
"session start" flag.
|
"session start" flag.
|
||||||
|
|
||||||
* VHOST_USER_RESET_OWNER
|
* VHOST_USER_RESET_DEVICE
|
||||||
|
|
||||||
Id: 4
|
Id: 4
|
||||||
Equivalent ioctl: VHOST_RESET_OWNER
|
Equivalent ioctl: VHOST_RESET_DEVICE
|
||||||
Master payload: N/A
|
Master payload: N/A
|
||||||
|
|
||||||
Issued when a new connection is about to be closed. The Master will no
|
Issued when a new connection is about to be closed. The Master will no
|
||||||
|
@ -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) {
|
} else if (net->nc->info->type == NET_CLIENT_OPTIONS_KIND_VHOST_USER) {
|
||||||
for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {
|
for (file.index = 0; file.index < net->dev.nvqs; ++file.index) {
|
||||||
const VhostOps *vhost_ops = net->dev.vhost_ops;
|
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);
|
NULL);
|
||||||
assert(r >= 0);
|
assert(r >= 0);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ typedef enum VhostUserRequest {
|
|||||||
VHOST_USER_GET_FEATURES = 1,
|
VHOST_USER_GET_FEATURES = 1,
|
||||||
VHOST_USER_SET_FEATURES = 2,
|
VHOST_USER_SET_FEATURES = 2,
|
||||||
VHOST_USER_SET_OWNER = 3,
|
VHOST_USER_SET_OWNER = 3,
|
||||||
VHOST_USER_RESET_OWNER = 4,
|
VHOST_USER_RESET_DEVICE = 4,
|
||||||
VHOST_USER_SET_MEM_TABLE = 5,
|
VHOST_USER_SET_MEM_TABLE = 5,
|
||||||
VHOST_USER_SET_LOG_BASE = 6,
|
VHOST_USER_SET_LOG_BASE = 6,
|
||||||
VHOST_USER_SET_LOG_FD = 7,
|
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_GET_FEATURES, /* VHOST_USER_GET_FEATURES */
|
||||||
VHOST_SET_FEATURES, /* VHOST_USER_SET_FEATURES */
|
VHOST_SET_FEATURES, /* VHOST_USER_SET_FEATURES */
|
||||||
VHOST_SET_OWNER, /* VHOST_USER_SET_OWNER */
|
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_MEM_TABLE, /* VHOST_USER_SET_MEM_TABLE */
|
||||||
VHOST_SET_LOG_BASE, /* VHOST_USER_SET_LOG_BASE */
|
VHOST_SET_LOG_BASE, /* VHOST_USER_SET_LOG_BASE */
|
||||||
VHOST_SET_LOG_FD, /* VHOST_USER_SET_LOG_FD */
|
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;
|
break;
|
||||||
|
|
||||||
case VHOST_USER_SET_OWNER:
|
case VHOST_USER_SET_OWNER:
|
||||||
case VHOST_USER_RESET_OWNER:
|
case VHOST_USER_RESET_DEVICE:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VHOST_USER_SET_MEM_TABLE:
|
case VHOST_USER_SET_MEM_TABLE:
|
||||||
|
@ -78,7 +78,7 @@ struct vhost_memory {
|
|||||||
#define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01)
|
#define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01)
|
||||||
/* Give up ownership, and reset the device to default values.
|
/* Give up ownership, and reset the device to default values.
|
||||||
* Allows subsequent call to VHOST_OWNER_SET to succeed. */
|
* 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 */
|
/* Set up/modify memory layout */
|
||||||
#define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory)
|
#define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory)
|
||||||
|
@ -58,7 +58,7 @@ typedef enum VhostUserRequest {
|
|||||||
VHOST_USER_GET_FEATURES = 1,
|
VHOST_USER_GET_FEATURES = 1,
|
||||||
VHOST_USER_SET_FEATURES = 2,
|
VHOST_USER_SET_FEATURES = 2,
|
||||||
VHOST_USER_SET_OWNER = 3,
|
VHOST_USER_SET_OWNER = 3,
|
||||||
VHOST_USER_RESET_OWNER = 4,
|
VHOST_USER_RESET_DEVICE = 4,
|
||||||
VHOST_USER_SET_MEM_TABLE = 5,
|
VHOST_USER_SET_MEM_TABLE = 5,
|
||||||
VHOST_USER_SET_LOG_BASE = 6,
|
VHOST_USER_SET_LOG_BASE = 6,
|
||||||
VHOST_USER_SET_LOG_FD = 7,
|
VHOST_USER_SET_LOG_FD = 7,
|
||||||
|
Loading…
Reference in New Issue
Block a user