diff options
author | John Levon <john.levon@nutanix.com> | 2021-05-25 16:01:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-25 16:01:20 +0100 |
commit | 29d91682128b26482c55a7f87b4849cd05d8ca88 (patch) | |
tree | b6a00871c6c5488e0da9082bdd81e57442ff1c0c /lib/tran_sock.c | |
parent | df72df510f4696fb4835fd42e8f4de2dcb7cf428 (diff) | |
download | libvfio-user-29d91682128b26482c55a7f87b4849cd05d8ca88.zip libvfio-user-29d91682128b26482c55a7f87b4849cd05d8ca88.tar.gz libvfio-user-29d91682128b26482c55a7f87b4849cd05d8ca88.tar.bz2 |
more spec updates (#491)
update spec to v0.9.1
Changes include:
- reply message includes the command number
- split out message definitions into request/reply sections, and
skip the repeated standard header definitions
- lots of markup fixes
- re-organization for clarity
- further documentation of argsz
- remove VFIO_USER_VM_INTERRUPT until we have a working implementation
- dirty page tracking is optional
- fix implementations to match the spec
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/tran_sock.c')
-rw-r--r-- | lib/tran_sock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/tran_sock.c b/lib/tran_sock.c index 8de24bb..9a36f3e 100644 --- a/lib/tran_sock.c +++ b/lib/tran_sock.c @@ -77,8 +77,8 @@ MOCK_DEFINE(tran_sock_send_iovec)(int sock, uint16_t msg_id, bool is_reply, memset(&msg, 0, sizeof(msg)); if (is_reply) { - // FIXME: SPEC: should the reply include the command? I'd say yes? hdr.flags.type = VFIO_USER_F_TYPE_REPLY; + hdr.cmd = cmd; if (err != 0) { hdr.flags.error = 1U; hdr.error_no = err; @@ -849,8 +849,7 @@ tran_sock_reply(vfu_ctx_t *vfu_ctx, vfu_msg_t *msg, int err) iovecs[1].iov_len = msg->out_size; } - // FIXME: SPEC: should the reply include the command? I'd say yes? - ret = tran_sock_send_iovec(ts->conn_fd, msg->hdr.msg_id, true, 0, + ret = tran_sock_send_iovec(ts->conn_fd, msg->hdr.msg_id, true, msg->hdr.cmd, iovecs, nr_iovecs, msg->out_fds, msg->nr_out_fds, err); |