* [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_
@ 2023-02-08 20:32 Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 1/3] docs: vhost-user: " Maxime Coquelin
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Maxime Coquelin @ 2023-02-08 20:32 UTC (permalink / raw)
To: qemu-devel, mst, pbonzini, stephen, chenbo.xia, thomas, dmarchan
Cc: Maxime Coquelin
This series continues the work done to switch to a more
inclusive terminology in the Vhost-user specification.
While the spec texts were changed to replace slave with
backend, the protocol features and messages names hadn't
been changed.
This series renames remaining occurences in the spec and
make use of the new names in both libvhost-user and the
Vhost-user frontend code.
Changes in v2:
==============
- Use positive wording (Michael)
- Fix grammar mistakes (Michael)
Maxime Coquelin (3):
docs: vhost-user: replace _SLAVE_ with _BACKEND_
libvhost-user: Adopt new backend naming
vhost-user: Adopt new backend naming
docs/interop/vhost-user.rst | 40 +++++++++++------------
hw/virtio/vhost-user.c | 30 ++++++++---------
hw/virtio/virtio-qmp.c | 12 +++----
subprojects/libvhost-user/libvhost-user.c | 20 ++++++------
subprojects/libvhost-user/libvhost-user.h | 20 ++++++------
5 files changed, 61 insertions(+), 61 deletions(-)
--
2.39.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] docs: vhost-user: replace _SLAVE_ with _BACKEND_
2023-02-08 20:32 [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Maxime Coquelin
@ 2023-02-08 20:32 ` Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 2/3] libvhost-user: Adopt new backend naming Maxime Coquelin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2023-02-08 20:32 UTC (permalink / raw)
To: qemu-devel, mst, pbonzini, stephen, chenbo.xia, thomas, dmarchan
Cc: Maxime Coquelin
Backend's message and protocol features names were still
using "_SLAVE_" naming. For consistency with the new naming
convention, replace it with _BACKEND_.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
docs/interop/vhost-user.rst | 40 ++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst
index 3f18ab424e..8a5924ea75 100644
--- a/docs/interop/vhost-user.rst
+++ b/docs/interop/vhost-user.rst
@@ -315,7 +315,7 @@ in the ancillary data:
* ``VHOST_USER_SET_VRING_KICK``
* ``VHOST_USER_SET_VRING_CALL``
* ``VHOST_USER_SET_VRING_ERR``
-* ``VHOST_USER_SET_SLAVE_REQ_FD``
+* ``VHOST_USER_SET_BACKEND_REQ_FD`` (previous name ``VHOST_USER_SET_SLAVE_REQ_FD``)
* ``VHOST_USER_SET_INFLIGHT_FD`` (if ``VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD``)
If *front-end* is unable to send the full message or receives a wrong
@@ -516,7 +516,7 @@ expected to reply with a zero payload, non-zero otherwise.
The back-end relies on the back-end communication channel (see :ref:`Back-end
communication <backend_communication>` section below) to send IOTLB miss
-and access failure events, by sending ``VHOST_USER_SLAVE_IOTLB_MSG``
+and access failure events, by sending ``VHOST_USER_BACKEND_IOTLB_MSG``
requests to the front-end with a ``struct vhost_iotlb_msg`` as
payload. For miss events, the iotlb payload has to be filled with the
miss message type (1), the I/O virtual address and the permissions
@@ -540,15 +540,15 @@ Back-end communication
----------------------
An optional communication channel is provided if the back-end declares
-``VHOST_USER_PROTOCOL_F_SLAVE_REQ`` protocol feature, to allow the
+``VHOST_USER_PROTOCOL_F_BACKEND_REQ`` protocol feature, to allow the
back-end to make requests to the front-end.
-The fd is provided via ``VHOST_USER_SET_SLAVE_REQ_FD`` ancillary data.
+The fd is provided via ``VHOST_USER_SET_BACKEND_REQ_FD`` ancillary data.
-A back-end may then send ``VHOST_USER_SLAVE_*`` messages to the front-end
+A back-end may then send ``VHOST_USER_BACKEND_*`` messages to the front-end
using this fd communication channel.
-If ``VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD`` protocol feature is
+If ``VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD`` protocol feature is
negotiated, back-end can send file descriptors (at most 8 descriptors in
each message) to front-end via ancillary data using this fd communication
channel.
@@ -835,7 +835,7 @@ Note that due to the fact that too many messages on the sockets can
cause the sending application(s) to block, it is not advised to use
this feature unless absolutely necessary. It is also considered an
error to negotiate this feature without also negotiating
-``VHOST_USER_PROTOCOL_F_SLAVE_REQ`` and ``VHOST_USER_PROTOCOL_F_REPLY_ACK``,
+``VHOST_USER_PROTOCOL_F_BACKEND_REQ`` and ``VHOST_USER_PROTOCOL_F_REPLY_ACK``,
the former is necessary for getting a message channel from the back-end
to the front-end, while the latter needs to be used with the in-band
notification messages to block until they are processed, both to avoid
@@ -855,12 +855,12 @@ Protocol features
#define VHOST_USER_PROTOCOL_F_RARP 2
#define VHOST_USER_PROTOCOL_F_REPLY_ACK 3
#define VHOST_USER_PROTOCOL_F_MTU 4
- #define VHOST_USER_PROTOCOL_F_SLAVE_REQ 5
+ #define VHOST_USER_PROTOCOL_F_BACKEND_REQ 5
#define VHOST_USER_PROTOCOL_F_CROSS_ENDIAN 6
#define VHOST_USER_PROTOCOL_F_CRYPTO_SESSION 7
#define VHOST_USER_PROTOCOL_F_PAGEFAULT 8
#define VHOST_USER_PROTOCOL_F_CONFIG 9
- #define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10
+ #define VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD 10
#define VHOST_USER_PROTOCOL_F_HOST_NOTIFIER 11
#define VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD 12
#define VHOST_USER_PROTOCOL_F_RESET_DEVICE 13
@@ -1059,8 +1059,8 @@ Front-end message types
in the ancillary data. This signals that polling will be used
instead of waiting for the call. Note that if the protocol features
``VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS`` and
- ``VHOST_USER_PROTOCOL_F_SLAVE_REQ`` have been negotiated this message
- isn't necessary as the ``VHOST_USER_SLAVE_VRING_CALL`` message can be
+ ``VHOST_USER_PROTOCOL_F_BACKEND_REQ`` have been negotiated this message
+ isn't necessary as the ``VHOST_USER_BACKEND_VRING_CALL`` message can be
used, it may however still be used to set an event file descriptor
or to enable polling.
@@ -1077,8 +1077,8 @@ Front-end message types
invalid FD flag. This flag is set when there is no file descriptor
in the ancillary data. Note that if the protocol features
``VHOST_USER_PROTOCOL_F_INBAND_NOTIFICATIONS`` and
- ``VHOST_USER_PROTOCOL_F_SLAVE_REQ`` have been negotiated this message
- isn't necessary as the ``VHOST_USER_SLAVE_VRING_ERR`` message can be
+ ``VHOST_USER_PROTOCOL_F_BACKEND_REQ`` have been negotiated this message
+ isn't necessary as the ``VHOST_USER_BACKEND_VRING_ERR`` message can be
used, it may however still be used to set an event file descriptor
(which will be preferred over the message).
@@ -1139,7 +1139,7 @@ Front-end message types
respond with zero in case the specified MTU is valid, or non-zero
otherwise.
-``VHOST_USER_SET_SLAVE_REQ_FD``
+``VHOST_USER_SET_BACKEND_REQ_FD`` (previous name ``VHOST_USER_SET_SLAVE_REQ_FD``)
:id: 21
:equivalent ioctl: N/A
:request payload: N/A
@@ -1150,7 +1150,7 @@ Front-end message types
This request should be sent only when
``VHOST_USER_F_PROTOCOL_FEATURES`` has been negotiated, and protocol
- feature bit ``VHOST_USER_PROTOCOL_F_SLAVE_REQ`` bit is present in
+ feature bit ``VHOST_USER_PROTOCOL_F_BACKEND_REQ`` bit is present in
``VHOST_USER_GET_PROTOCOL_FEATURES``. If
``VHOST_USER_PROTOCOL_F_REPLY_ACK`` is negotiated, the back-end must
respond with zero for success, non-zero otherwise.
@@ -1429,7 +1429,7 @@ Back-end message types
For this type of message, the request is sent by the back-end and the reply
is sent by the front-end.
-``VHOST_USER_SLAVE_IOTLB_MSG``
+``VHOST_USER_BACKEND_IOTLB_MSG`` (previous name ``VHOST_USER_SLAVE_IOTLB_MSG``)
:id: 1
:equivalent ioctl: N/A (equivalent to ``VHOST_IOTLB_MSG`` message type)
:request payload: ``struct vhost_iotlb_msg``
@@ -1444,7 +1444,7 @@ is sent by the front-end.
``VIRTIO_F_IOMMU_PLATFORM`` feature has been successfully
negotiated.
-``VHOST_USER_SLAVE_CONFIG_CHANGE_MSG``
+``VHOST_USER_BACKEND_CONFIG_CHANGE_MSG`` (previous name ``VHOST_USER_SLAVE_CONFIG_CHANGE_MSG``)
:id: 2
:equivalent ioctl: N/A
:request payload: N/A
@@ -1459,7 +1459,7 @@ is sent by the front-end.
``VHOST_USER_NEED_REPLY`` flag, the front-end must respond with zero when
operation is successfully completed, or non-zero otherwise.
-``VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG``
+``VHOST_USER_BACKEND_VRING_HOST_NOTIFIER_MSG`` (previous name ``VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG``)
:id: 3
:equivalent ioctl: N/A
:request payload: vring area description
@@ -1482,7 +1482,7 @@ is sent by the front-end.
``VHOST_USER_PROTOCOL_F_HOST_NOTIFIER`` protocol feature has been
successfully negotiated.
-``VHOST_USER_SLAVE_VRING_CALL``
+``VHOST_USER_BACKEND_VRING_CALL`` (previous name ``VHOST_USER_SLAVE_VRING_CALL``)
:id: 4
:equivalent ioctl: N/A
:request payload: vring state description
@@ -1496,7 +1496,7 @@ is sent by the front-end.
The state.num field is currently reserved and must be set to 0.
-``VHOST_USER_SLAVE_VRING_ERR``
+``VHOST_USER_BACKEND_VRING_ERR`` (previous name ``VHOST_USER_SLAVE_VRING_ERR``)
:id: 5
:equivalent ioctl: N/A
:request payload: vring state description
--
2.39.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] libvhost-user: Adopt new backend naming
2023-02-08 20:32 [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 1/3] docs: vhost-user: " Maxime Coquelin
@ 2023-02-08 20:32 ` Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 3/3] vhost-user: " Maxime Coquelin
2023-02-09 7:02 ` [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Philippe Mathieu-Daudé
3 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2023-02-08 20:32 UTC (permalink / raw)
To: qemu-devel, mst, pbonzini, stephen, chenbo.xia, thomas, dmarchan
Cc: Maxime Coquelin
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>
---
subprojects/libvhost-user/libvhost-user.c | 20 ++++++++++----------
subprojects/libvhost-user/libvhost-user.h | 20 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
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 = {
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 {
--
2.39.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] vhost-user: Adopt new backend naming
2023-02-08 20:32 [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 1/3] docs: vhost-user: " Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 2/3] libvhost-user: Adopt new backend naming Maxime Coquelin
@ 2023-02-08 20:32 ` Maxime Coquelin
2023-02-09 7:02 ` [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Philippe Mathieu-Daudé
3 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2023-02-08 20:32 UTC (permalink / raw)
To: qemu-devel, mst, pbonzini, stephen, chenbo.xia, thomas, dmarchan
Cc: Maxime Coquelin
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>
---
hw/virtio/vhost-user.c | 30 +++++++++++++++---------------
hw/virtio/virtio-qmp.c | 12 ++++++------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index e68daa35d4..8968541514 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -40,7 +40,7 @@
#define VHOST_MEMORY_BASELINE_NREGIONS 8
#define VHOST_USER_F_PROTOCOL_FEATURES 30
-#define VHOST_USER_SLAVE_MAX_FDS 8
+#define VHOST_USER_BACKEND_MAX_FDS 8
/*
* Set maximum number of RAM slots supported to
@@ -71,12 +71,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_RESET_DEVICE = 13,
@@ -110,7 +110,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,
@@ -134,11 +134,11 @@ 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_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_MAX
} VhostUserSlaveRequest;
typedef struct VhostUserMemoryRegion {
@@ -1638,13 +1638,13 @@ static gboolean slave_read(QIOChannel *ioc, GIOCondition condition,
}
switch (hdr.request) {
- case VHOST_USER_SLAVE_IOTLB_MSG:
+ case VHOST_USER_BACKEND_IOTLB_MSG:
ret = vhost_backend_handle_iotlb_msg(dev, &payload.iotlb);
break;
- case VHOST_USER_SLAVE_CONFIG_CHANGE_MSG :
+ case VHOST_USER_BACKEND_CONFIG_CHANGE_MSG:
ret = vhost_user_slave_handle_config_change(dev);
break;
- case VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG:
+ case VHOST_USER_BACKEND_VRING_HOST_NOTIFIER_MSG:
ret = vhost_user_slave_handle_vring_host_notifier(dev, &payload.area,
fd ? fd[0] : -1);
break;
@@ -1696,7 +1696,7 @@ fdcleanup:
static int vhost_setup_slave_channel(struct vhost_dev *dev)
{
VhostUserMsg msg = {
- .hdr.request = VHOST_USER_SET_SLAVE_REQ_FD,
+ .hdr.request = VHOST_USER_SET_BACKEND_REQ_FD,
.hdr.flags = VHOST_USER_VERSION,
};
struct vhost_user *u = dev->opaque;
@@ -1707,7 +1707,7 @@ static int vhost_setup_slave_channel(struct vhost_dev *dev)
QIOChannel *ioc;
if (!virtio_has_feature(dev->protocol_features,
- VHOST_USER_PROTOCOL_F_SLAVE_REQ)) {
+ VHOST_USER_PROTOCOL_F_BACKEND_REQ)) {
return 0;
}
@@ -2065,7 +2065,7 @@ static int vhost_user_backend_init(struct vhost_dev *dev, void *opaque,
if (virtio_has_feature(features, VIRTIO_F_IOMMU_PLATFORM) &&
!(virtio_has_feature(dev->protocol_features,
- VHOST_USER_PROTOCOL_F_SLAVE_REQ) &&
+ VHOST_USER_PROTOCOL_F_BACKEND_REQ) &&
virtio_has_feature(dev->protocol_features,
VHOST_USER_PROTOCOL_F_REPLY_ACK))) {
error_setg(errp, "IOMMU support requires reply-ack and "
diff --git a/hw/virtio/virtio-qmp.c b/hw/virtio/virtio-qmp.c
index e4d4bece2d..b70148aba9 100644
--- a/hw/virtio/virtio-qmp.c
+++ b/hw/virtio/virtio-qmp.c
@@ -42,12 +42,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_RESET_DEVICE = 13,
@@ -101,8 +101,8 @@ static const qmp_virtio_feature_map_t vhost_user_protocol_map[] = {
"supported"),
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_NET_MTU, \
"VHOST_USER_PROTOCOL_F_NET_MTU: Expose host MTU to guest supported"),
- FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_SLAVE_REQ, \
- "VHOST_USER_PROTOCOL_F_SLAVE_REQ: Socket fd for back-end initiated "
+ FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_BACKEND_REQ, \
+ "VHOST_USER_PROTOCOL_F_BACKEND_REQ: Socket fd for back-end initiated "
"requests supported"),
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_CROSS_ENDIAN, \
"VHOST_USER_PROTOCOL_F_CROSS_ENDIAN: Endianness of VQs for legacy "
@@ -116,8 +116,8 @@ static const qmp_virtio_feature_map_t vhost_user_protocol_map[] = {
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_CONFIG, \
"VHOST_USER_PROTOCOL_F_CONFIG: Vhost-user messaging for virtio "
"device configuration space supported"),
- FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD, \
- "VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD: Slave fd communication "
+ FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD, \
+ "VHOST_USER_PROTOCOL_F_BACKEND_SEND_FD: Slave fd communication "
"channel supported"),
FEATURE_ENTRY(VHOST_USER_PROTOCOL_F_HOST_NOTIFIER, \
"VHOST_USER_PROTOCOL_F_HOST_NOTIFIER: Host notifiers for specified "
--
2.39.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_
2023-02-08 20:32 [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Maxime Coquelin
` (2 preceding siblings ...)
2023-02-08 20:32 ` [PATCH v2 3/3] vhost-user: " Maxime Coquelin
@ 2023-02-09 7:02 ` Philippe Mathieu-Daudé
3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-02-09 7:02 UTC (permalink / raw)
To: Maxime Coquelin, qemu-devel, mst, pbonzini, stephen, chenbo.xia,
thomas, dmarchan
On 8/2/23 21:32, Maxime Coquelin wrote:
> Maxime Coquelin (3):
> docs: vhost-user: replace _SLAVE_ with _BACKEND_
> libvhost-user: Adopt new backend naming
> vhost-user: Adopt new backend naming
>
> docs/interop/vhost-user.rst | 40 +++++++++++------------
> hw/virtio/vhost-user.c | 30 ++++++++---------
> hw/virtio/virtio-qmp.c | 12 +++----
> subprojects/libvhost-user/libvhost-user.c | 20 ++++++------
> subprojects/libvhost-user/libvhost-user.h | 20 ++++++------
> 5 files changed, 61 insertions(+), 61 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-09 7:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 20:32 [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 1/3] docs: vhost-user: " Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 2/3] libvhost-user: Adopt new backend naming Maxime Coquelin
2023-02-08 20:32 ` [PATCH v2 3/3] vhost-user: " Maxime Coquelin
2023-02-09 7:02 ` [PATCH v2 0/3] Vhost-user: replace _SLAVE_ with _BACKEND_ Philippe Mathieu-Daudé
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).