From 2f9c79529062787e9afe1e6fe86053cb5c68e6ec Mon Sep 17 00:00:00 2001 From: Yang Zhong Date: Thu, 4 Jul 2019 19:39:26 +0800 Subject: vhost-user: Change get_config()/set_config() Use acked_protocol_features to replace acked_virtio_features in get_config()/set_config() for protocol features like CONFIG. This patch also fix wrong GET_CONFIG setting for set_config(). Signed-off-by: Yang Zhong --- src/vhost_user/master.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vhost_user') diff --git a/src/vhost_user/master.rs b/src/vhost_user/master.rs index 02eb715..d437ee4 100644 --- a/src/vhost_user/master.rs +++ b/src/vhost_user/master.rs @@ -352,7 +352,7 @@ impl VhostUserMaster for Master { let mut node = self.node.lock().unwrap(); // depends on VhostUserProtocolFeatures::CONFIG - if node.acked_virtio_features & VhostUserProtocolFeatures::CONFIG.bits() == 0 { + if node.acked_protocol_features & VhostUserProtocolFeatures::CONFIG.bits() == 0 { return error_code(VhostUserError::InvalidOperation); } @@ -384,11 +384,11 @@ impl VhostUserMaster for Master { let mut node = self.node.lock().unwrap(); // depends on VhostUserProtocolFeatures::CONFIG - if node.acked_virtio_features & VhostUserProtocolFeatures::CONFIG.bits() == 0 { + if node.acked_protocol_features & VhostUserProtocolFeatures::CONFIG.bits() == 0 { return error_code(VhostUserError::InvalidOperation); } - let hdr = node.send_request_with_payload(MasterReq::GET_CONFIG, &body, buf, None)?; + let hdr = node.send_request_with_payload(MasterReq::SET_CONFIG, &body, buf, None)?; node.wait_for_ack(&hdr).map_err(|e| e.into()) } -- cgit v1.2.3