[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 1/3] vhost-user: update the protocol.
From: |
linhaifeng |
Subject: |
[Qemu-devel] [PATCH v3 1/3] vhost-user: update the protocol. |
Date: |
Sun, 15 Feb 2015 13:37:01 +0800 |
From: Linhaifeng <address@hidden>
Every messages need reply.
This path just update the vhost-user.txt to version 0x6.
Signed-off-by: Linhaifeng <address@hidden>
---
docs/specs/vhost-user.txt | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt
index 650bb18..c54d1e2 100644
--- a/docs/specs/vhost-user.txt
+++ b/docs/specs/vhost-user.txt
@@ -23,6 +23,10 @@ be a software Ethernet switch running in user space, such as
Snabbswitch.
Master and slave can be either a client (i.e. connecting) or server (listening)
in the socket communication.
+version 0x5: Supply base communication between master and slave.
+version 0x6: Add reply for more robust.
+
+
Message Specification
---------------------
@@ -30,13 +34,11 @@ Note that all numbers are in the machine native byte order.
A vhost-user message
consists of 3 header fields and a payload:
------------------------------------
-| request | flags | size | payload |
+| request | version | size | payload |
------------------------------------
* Request: 32-bit type of the request
- * Flags: 32-bit bit field:
- - Lower 2 bits are the version (currently 0x01)
- - Bit 2 is the reply flag - needs to be sent on each reply from the slave
+ * Version: 32-bit version
* Size - 32-bit size of the payload
@@ -144,6 +146,7 @@ Message types
Id: 2
Ioctl: VHOST_SET_FEATURES
Master payload: u64
+ Slave payload: u64 0:success else:fail
Enable features in the underlying vhost implementation using a bitmask.
@@ -171,6 +174,7 @@ Message types
Id: 5
Equivalent ioctl: VHOST_SET_MEM_TABLE
Master payload: memory regions description
+ Slave payload: u64 0:success else:fail
Sets the memory map regions on the slave so it can translate the vring
addresses. In the ancillary data there is an array of file descriptors
@@ -182,6 +186,7 @@ Message types
Id: 6
Equivalent ioctl: VHOST_SET_LOG_BASE
Master payload: u64
+ Slave payload: u64 0:success else:fail
Sets the logging base address.
@@ -190,6 +195,7 @@ Message types
Id: 7
Equivalent ioctl: VHOST_SET_LOG_FD
Master payload: N/A
+ Slave payload: u64 0:success else:fail
Sets the logging file descriptor, which is passed as ancillary data.
@@ -198,6 +204,7 @@ Message types
Id: 8
Equivalent ioctl: VHOST_SET_VRING_NUM
Master payload: vring state description
+ Slave payload: u64 0:success else:fail
Sets the number of vrings for this owner.
@@ -206,7 +213,7 @@ Message types
Id: 9
Equivalent ioctl: VHOST_SET_VRING_ADDR
Master payload: vring address description
- Slave payload: N/A
+ Slave payload: u64 0:success else:fail
Sets the addresses of the different aspects of the vring.
@@ -215,6 +222,7 @@ Message types
Id: 10
Equivalent ioctl: VHOST_SET_VRING_BASE
Master payload: vring state description
+ Slave payload: u64 0:success else:fail
Sets the base offset in the available vring.
@@ -232,6 +240,7 @@ Message types
Id: 12
Equivalent ioctl: VHOST_SET_VRING_KICK
Master payload: u64
+ Slave payload: u64 0:success else:fail
Set the event file descriptor for adding buffers to the vring. It
is passed in the ancillary data.
@@ -245,6 +254,7 @@ Message types
Id: 13
Equivalent ioctl: VHOST_SET_VRING_CALL
Master payload: u64
+ Slave payload: u64 0:success else:fail
Set the event file descriptor to signal when buffers are used. It
is passed in the ancillary data.
@@ -258,6 +268,7 @@ Message types
Id: 14
Equivalent ioctl: VHOST_SET_VRING_ERR
Master payload: u64
+ Slave payload: u64 0:success else:fail
Set the event file descriptor to signal when error occurs. It
is passed in the ancillary data.
--
1.7.12.4