From 5ac013df8be4d6539e10ef0465a9cd441a60bec5 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Tue, 28 Sep 2021 11:22:47 +0200 Subject: [PATCH] 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 --- virtio-devices/src/vhost_user/fs.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/virtio-devices/src/vhost_user/fs.rs b/virtio-devices/src/vhost_user/fs.rs index 9b5fb25cd..2834e152c 100644 --- a/virtio-devices/src/vhost_user/fs.rs +++ b/virtio-devices/src/vhost_user/fs.rs @@ -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