Age | Commit message (Collapse) | Author |
|
Make `cargo clippy --all-features --all-targets` pass.
Signed-off-by: Keiichi Watanabe <keiichiw@chromium.org>
|
|
Add more unit test cases for vhost-user protocol.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
|
|
Use std::ptr::read_aligned() to safely access data buffer instead of
directly accessing data struct in data buffer.
Also enforce stricter message size validation.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
|
|
Rename the original VhostUserSlaveReqHandler trait as
VhostUserSlaveReqHandlerMut, and add another VhostUserSlaveReqHandler
trait with interior mutability.
This also help to simplify caller implementations.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
|
|
An acknowlege reply message should be sent iif:
1) the VHOST_USER_PROTOCOL_F_REPLY_ACK feature is nogotiated,
2) the NEED_REPLY in header.flags is set.
Also enforce stricter validation for message size.
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
|
|
Refine connection implementation by:
1) using "payload: &[u8]" for send_message_with_payload()
2) enabling all unit test cases
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
|
|
SLAVE_SEND_FD and SLAVE_REQ are different protocol features. Check for
SLAVE_REQ instead.
Signed-off-by: Sergio Lopez <slp@redhat.com>
|
|
This adds the missing part of supporting virtiofs dax on the slave end,
that is, receiving a socket pair fd from the master end to set up a
communication channel for sending setupmapping & removemapping messages.
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
|
|
The VhostUserConfig carries a message with a payload, the contents of
which depend on the kind of device being emulated.
With this change, we calculate the offset of the payload within the
message, check its size corresponds to the expected one, and pass it
to the backend as a reference to a slice adjusted to the payload
dimensions.
The backend will be responsible of validating the payload, as it's the
one aware of its expected contents.
Signed-off-by: Sergio Lopez <slp@redhat.com>
|
|
Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Daniel Prilik <daniel@prilik.com>
|