On Tuesday, November 8, 2016 7:36 PM, Wei Wang wrote: Missed this one: > > Currently all requests (including VHOST_USER_SET_FEATURES) are coming > > from the Master. I don't understand yet the purpose of > > VHOST_USER_SET_PEER_CONNECTION to propose an alternative, but I would > > rather keep the unidirectional communication if possible.
The VHOST_USER_SET_PEER_CONNECTION is proposed here to turn “on/off” the device connection status. For example, when the master side VM wants to turn down, the virtio-net driver sets the virtio-net device’s PEER_CONNECTION status to “off”, which needs to first synchronize with the vhost-pci device using this message. In return, the vhost-pci device will send VHOST_USER_SET_PEER_CONNECTION(cmd=OFF) to the virtio-net device, then the status is set to OFF, and the driver is ok to unload. (Same for the vhost-pci driver to unload) Best, Wei