Comments (4)
@jiangliu any idea how you expect this to be handled?
I was thinking we could extend the Master
structure with an extra method set_flags
, set the flags for MasterInternal
(which would have a new field).
Then we need to make new_request_header()
a method of MasterInternal
, so that we could provide the proper flags when the header is created with VhostUserMsgHeader::new()
.
WDYT?
from vhost.
There's one issue here, according to the spec:
VHOST_USER_PROTOCOL_F_REPLY_ACK
The original vhost-user specification only demands replies for certain commands. This differs from the vhost protocol implementation where commands are sent over an ioctl() call and block until the client has completed.
With this protocol extension negotiated, the sender (QEMU) can set the need_reply [Bit 3] flag to any command. This indicates that the client MUST respond with a Payload VhostUserMsg indicating success or failure. The payload should be set to zero on success or non-zero on failure, unless the message already has an explicit reply body.
So the NEED_REPLY flag is per message instead of per connection. If we implement it as per connection, the code change will not be trivial. But if we implement as per connection, that doesn't follow the spec too. Not sure how qemu makes use of the flag.
from vhost.
So the NEED_REPLY flag is per message instead of per connection. If we implement it as per connection, the code change will not be trivial. But if we implement as per connection, that doesn't follow the spec too. Not sure how qemu makes use of the flag.
I agree you should be able to enable it on a per message basis instead of a per connection one. In practice, I think you either want your connection to be synchronized or you don't, but I still agree we should follow the spec.
I think the approach I've described can provide a simple way of achieving this, since you could call into the set_flags()
method before you issue a new command. That means each time you invoke a command, it will evaluate what's in MasterInternal
.
That's the less intrusive way of implementing this whole thing, otherwise you would have to modify all the existing functions (hence breaking the API), by adding a flags parameter to all of them.
About QEMU, unless I'm mistaken, I don't think it handles this feature.
from vhost.
Sounds like a plan.
from vhost.
Related Issues (20)
- vdpa: Incorrect implementation of get_iova_range() HOT 3
- Vring addresses are not inside guest memory range if placed behind a vIOMMU HOT 10
- Mac build support HOT 5
- Release version 0.1.0 to crates.io HOT 7
- Typo `vhots v0.4.0` in GitHub Release HOT 1
- Clarification of return type of `handle_event` HOT 3
- vhost_kern: add vhost-net support HOT 2
- vhost: check better if `GET_VRING_BASE` message should reset the vring HOT 1
- vhost-user: Implement VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS HOT 2
- Check non-default feature code and tests in vhost-ci/clippy-x86 HOT 2
- Offset in VHOST_USER_GET_CONFIG/SET_CONFIG mismatch with qemu HOT 3
- Add CODEOWNERS file HOT 1
- vhost_user: Use File instead of RawFd in VhostUserSlaveReqHandler trait HOT 5
- Goal for the crate HOT 2
- Add support for Inflight I/O tracking HOT 1
- Switch to rust-vmm-ci HOT 1
- Submit dragonball branch changes into master branch
- Just a misoperation
- Change VhostUserSlaveReqHandler::set_slave_req_fd() to take an UnixStream instead of SlaveFsCacheReq HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vhost.