[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/53] libvhost-user: Adopt new backend naming
From: |
Michael S. Tsirkin |
Subject: |
[PULL 17/53] libvhost-user: Adopt new backend naming |
Date: |
Thu, 2 Mar 2023 03:25:23 -0500 |
From: Maxime Coquelin <maxime.coquelin@redhat.com>
The Vhost-user specification changed feature and request
naming from _SLAVE_ to _BACKEND_.
This patch adopts the new naming convention.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-Id: <20230208203259.381326-3-maxime.coquelin@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
subprojects/libvhost-user/libvhost-user.h | 20 ++++++++++----------
subprojects/libvhost-user/libvhost-user.c | 20 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/subprojects/libvhost-user/libvhost-user.h
b/subprojects/libvhost-user/libvhost-user.h
index 8cda9b8f57..8c5a2719e3 100644
--- a/subprojects/libvhost-user/libvhost-user.h
+++ b/subprojects/libvhost-user/libvhost-user.h
@@ -54,12 +54,12 @@ enum VhostUserProtocolFeature {
VHOST_USER_PROTOCOL_F_RARP = 2,
VHOST_USER_PROTOCOL_F_REPLY_ACK = 3,
VHOST_USER_PROTOCOL_F_NET_MTU = 4,
- VHOST_USER_PROTOCOL_F_SLAVE_REQ = 5,
+ VHOST_USER_PROTOCOL_F_BACKEND_REQ = 5,
VHOST_USER_PROTOCOL_F_CROSS_ENDIAN = 6,
VHOST_USER_PROTOCOL_F_CRYPTO_SESSION = 7,
VHOST_USER_PROTOCOL_F_PAGEFAULT = 8,
VHOST_USER_PROTOCOL_F_CONFIG = 9,
- VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD = 10,
+ VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD = 10,
VHOST_USER_PROTOCOL_F_HOST_NOTIFIER = 11,
VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD = 12,
VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS = 14,
@@ -92,7 +92,7 @@ typedef enum VhostUserRequest {
VHOST_USER_SET_VRING_ENABLE = 18,
VHOST_USER_SEND_RARP = 19,
VHOST_USER_NET_SET_MTU = 20,
- VHOST_USER_SET_SLAVE_REQ_FD = 21,
+ VHOST_USER_SET_BACKEND_REQ_FD = 21,
VHOST_USER_IOTLB_MSG = 22,
VHOST_USER_SET_VRING_ENDIAN = 23,
VHOST_USER_GET_CONFIG = 24,
@@ -113,13 +113,13 @@ typedef enum VhostUserRequest {
} VhostUserRequest;
typedef enum VhostUserSlaveRequest {
- VHOST_USER_SLAVE_NONE = 0,
- VHOST_USER_SLAVE_IOTLB_MSG = 1,
- VHOST_USER_SLAVE_CONFIG_CHANGE_MSG = 2,
- VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG = 3,
- VHOST_USER_SLAVE_VRING_CALL = 4,
- VHOST_USER_SLAVE_VRING_ERR = 5,
- VHOST_USER_SLAVE_MAX
+ VHOST_USER_BACKEND_NONE = 0,
+ VHOST_USER_BACKEND_IOTLB_MSG = 1,
+ VHOST_USER_BACKEND_CONFIG_CHANGE_MSG = 2,
+ VHOST_USER_BACKEND_VRING_HOST_NOTIFIER_MSG = 3,
+ VHOST_USER_BACKEND_VRING_CALL = 4,
+ VHOST_USER_BACKEND_VRING_ERR = 5,
+ VHOST_USER_BACKEND_MAX
} VhostUserSlaveRequest;
typedef struct VhostUserMemoryRegion {
diff --git a/subprojects/libvhost-user/libvhost-user.c
b/subprojects/libvhost-user/libvhost-user.c
index fc69783d2b..f661af7c85 100644
--- a/subprojects/libvhost-user/libvhost-user.c
+++ b/subprojects/libvhost-user/libvhost-user.c
@@ -140,7 +140,7 @@ vu_request_to_string(unsigned int req)
REQ(VHOST_USER_SET_VRING_ENABLE),
REQ(VHOST_USER_SEND_RARP),
REQ(VHOST_USER_NET_SET_MTU),
- REQ(VHOST_USER_SET_SLAVE_REQ_FD),
+ REQ(VHOST_USER_SET_BACKEND_REQ_FD),
REQ(VHOST_USER_IOTLB_MSG),
REQ(VHOST_USER_SET_VRING_ENDIAN),
REQ(VHOST_USER_GET_CONFIG),
@@ -1365,7 +1365,7 @@ bool vu_set_queue_host_notifier(VuDev *dev, VuVirtq *vq,
int fd,
int qidx = vq - dev->vq;
int fd_num = 0;
VhostUserMsg vmsg = {
- .request = VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG,
+ .request = VHOST_USER_BACKEND_VRING_HOST_NOTIFIER_MSG,
.flags = VHOST_USER_VERSION | VHOST_USER_NEED_REPLY_MASK,
.size = sizeof(vmsg.payload.area),
.payload.area = {
@@ -1383,7 +1383,7 @@ bool vu_set_queue_host_notifier(VuDev *dev, VuVirtq *vq,
int fd,
vmsg.fd_num = fd_num;
- if (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD)) {
+ if (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD)) {
return false;
}
@@ -1461,9 +1461,9 @@ vu_get_protocol_features_exec(VuDev *dev, VhostUserMsg
*vmsg)
*/
uint64_t features = 1ULL << VHOST_USER_PROTOCOL_F_MQ |
1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD |
- 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_REQ |
+ 1ULL << VHOST_USER_PROTOCOL_F_BACKEND_REQ |
1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER |
- 1ULL << VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD |
+ 1ULL << VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD |
1ULL << VHOST_USER_PROTOCOL_F_REPLY_ACK |
1ULL << VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS;
@@ -1494,7 +1494,7 @@ vu_set_protocol_features_exec(VuDev *dev, VhostUserMsg
*vmsg)
if (vu_has_protocol_feature(dev,
VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS) &&
- (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_SLAVE_REQ) ||
+ (!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_BACKEND_REQ) ||
!vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_REPLY_ACK))) {
/*
* The use case for using messages for kick/call is simulation, to make
@@ -1507,7 +1507,7 @@ vu_set_protocol_features_exec(VuDev *dev, VhostUserMsg
*vmsg)
* that actually enables the simulation case.
*/
vu_panic(dev,
- "F_IN_BAND_NOTIFICATIONS requires F_SLAVE_REQ &&
F_REPLY_ACK");
+ "F_IN_BAND_NOTIFICATIONS requires F_BACKEND_REQ &&
F_REPLY_ACK");
return false;
}
@@ -1910,7 +1910,7 @@ vu_process_message(VuDev *dev, VhostUserMsg *vmsg)
return vu_get_queue_num_exec(dev, vmsg);
case VHOST_USER_SET_VRING_ENABLE:
return vu_set_vring_enable_exec(dev, vmsg);
- case VHOST_USER_SET_SLAVE_REQ_FD:
+ case VHOST_USER_SET_BACKEND_REQ_FD:
return vu_set_slave_req_fd(dev, vmsg);
case VHOST_USER_GET_CONFIG:
return vu_get_config(dev, vmsg);
@@ -2416,9 +2416,9 @@ static void _vu_queue_notify(VuDev *dev, VuVirtq *vq,
bool sync)
if (vq->call_fd < 0 &&
vu_has_protocol_feature(dev,
VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS) &&
- vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_SLAVE_REQ)) {
+ vu_has_protocol_feature(dev, VHOST_USER_PROTOCOL_F_BACKEND_REQ)) {
VhostUserMsg vmsg = {
- .request = VHOST_USER_SLAVE_VRING_CALL,
+ .request = VHOST_USER_BACKEND_VRING_CALL,
.flags = VHOST_USER_VERSION,
.size = sizeof(vmsg.payload.state),
.payload.state = {
--
MST
- [PULL 01/53] hw/smbios: fix field corruption in type 4 table, (continued)
- [PULL 01/53] hw/smbios: fix field corruption in type 4 table, Michael S. Tsirkin, 2023/03/02
- [PULL 02/53] Revert "x86: don't let decompressed kernel image clobber setup_data", Michael S. Tsirkin, 2023/03/02
- [PULL 04/53] Revert "x86: re-initialize RNG seed when selecting kernel", Michael S. Tsirkin, 2023/03/02
- [PULL 03/53] Revert "x86: do not re-randomize RNG seed on snapshot load", Michael S. Tsirkin, 2023/03/02
- [PULL 05/53] Revert "x86: reinitialize RNG seed on system reboot", Michael S. Tsirkin, 2023/03/02
- [PULL 09/53] virtio-net: clear guest_announce feature if no cvq backend, Michael S. Tsirkin, 2023/03/02
- [PULL 11/53] vhost-user-gpio: Configure vhost_dev when connecting, Michael S. Tsirkin, 2023/03/02
- [PULL 16/53] docs: vhost-user: replace _SLAVE_ with _BACKEND_, Michael S. Tsirkin, 2023/03/02
- [PULL 07/53] Revert "x86: return modified setup_data only if read as memory, not as file", Michael S. Tsirkin, 2023/03/02
- [PULL 13/53] vhost-user-rng: Back up vqs before cleaning up vhost_dev, Michael S. Tsirkin, 2023/03/02
- [PULL 17/53] libvhost-user: Adopt new backend naming,
Michael S. Tsirkin <=
- [PULL 10/53] backends/vhost-user: remove the ioeventfd check, Michael S. Tsirkin, 2023/03/02
- [PULL 12/53] vhost-user-i2c: Back up vqs before cleaning up vhost_dev, Michael S. Tsirkin, 2023/03/02
- [PULL 14/53] virtio-rng-pci: fix transitional migration compat for vectors, Michael S. Tsirkin, 2023/03/02
- [PULL 08/53] Revert "hw/i386: pass RNG seed via setup_data entry", Michael S. Tsirkin, 2023/03/02
- [PULL 15/53] hw/timer/hpet: Fix expiration time overflow, Michael S. Tsirkin, 2023/03/02
- [PULL 06/53] Revert "x86: use typedef for SetupData struct", Michael S. Tsirkin, 2023/03/02
- [PULL 18/53] vhost-user: Adopt new backend naming, Michael S. Tsirkin, 2023/03/02