lib: Set reply_ack based on acked protocol features
In case VHOST_USER_PROTOCOL_F_REPLY_ACK has been negotiated, the reply ack must be explicitly set on the SlaveFsCacheReq handler. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
46f2ad4fba
commit
a6e1e0fb6c
1 changed files with 4 additions and 0 deletions
|
|
@ -873,6 +873,10 @@ impl<S: VhostUserBackend> VhostUserSlaveReqHandlerMut for VhostUserHandler<S> {
|
|||
}
|
||||
|
||||
fn set_slave_req_fd(&mut self, vu_req: SlaveFsCacheReq) {
|
||||
if self.acked_protocol_features & VhostUserProtocolFeatures::REPLY_ACK.bits() != 0 {
|
||||
vu_req.set_reply_ack_flag(true);
|
||||
}
|
||||
|
||||
self.backend.write().unwrap().set_slave_req_fd(vu_req);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue