vhost-user-backend: Remove one checking from set_features

The vhost-user protocol does not indicate set_features could not
be issued more than once, the checking is not needed at all, and
prevent communication between master and slave. Remove it to
fix the issue.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
This commit is contained in:
Cathy Zhang 2019-09-24 13:32:20 +08:00 committed by Sebastien Boeuf
parent 347611b0c7
commit c4309515c9

View File

@ -573,7 +573,7 @@ impl<S: VhostUserBackend> VhostUserSlaveReqHandler for VhostUserHandler<S> {
}
fn set_features(&mut self, features: u64) -> VhostUserResult<()> {
if !self.owned || self.features_acked {
if !self.owned {
return Err(VhostUserError::InvalidOperation);
} else if (features & !self.backend.read().unwrap().features()) != 0 {
return Err(VhostUserError::InvalidParam);