virtio-devices: vhost-user: Set reply_ack conditionally

Setting the reply_ack should depend on the set of acknowledged features
containing the REPLY_ACK flag.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2021-09-28 11:22:47 +02:00 committed by Rob Bradford
parent 562a57012f
commit 5ac013df8b

View File

@ -521,7 +521,14 @@ impl VirtioDevice for Fs {
MasterReqHandler::new(vu_master_req_handler).map_err(|e| {
ActivateError::VhostUserFsSetup(Error::MasterReqHandlerCreation(e))
})?;
req_handler.set_reply_ack_flag(true);
if self.vu_common.acked_protocol_features
& VhostUserProtocolFeatures::REPLY_ACK.bits()
!= 0
{
req_handler.set_reply_ack_flag(true);
}
Some(req_handler)
} else {
None