virtio/user: don't send SET_VRING_ADDR after updating the memory table
Our internal rte_vhost lib requires SET_VRING_ADDR to flush a pending SET_MEM_TABLE. On the other hand, the upstream rte_vhost will invalidate the entire queue upon receiving SET_VRING_ADDR message, so we mustn't send it at runtime. Both behaviors are strictly implementation specific, but this message isn't needed by the spec, so send it only if vhost was compiled with our internal lib. Change-Id: I200b99a1dd5124bdebd104e69ae1b012a974ab6f Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446087 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
89c1dc774e
commit
2725b5191e
@ -165,13 +165,19 @@ virtio_user_map_notify(void *cb_ctx, struct spdk_mem_map *map,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* We have to send SET_VRING_ADDR to make rte_vhost flush a pending
|
||||
* SET_MEM_TABLE...
|
||||
#ifdef SPDK_CONFIG_VHOST_INTERNAL_LIB
|
||||
/* Our internal rte_vhost lib requires SET_VRING_ADDR to flush a pending
|
||||
* SET_MEM_TABLE. On the other hand, the upstream rte_vhost will invalidate
|
||||
* the entire queue upon receiving SET_VRING_ADDR message, so we mustn't
|
||||
* send it here. Both behaviors are strictly implementation specific, but
|
||||
* this message isn't needed from the point of the spec, so send it only
|
||||
* if vhost is compiled with our internal lib.
|
||||
*/
|
||||
ret = virtio_user_queue_setup(vdev, virtio_user_set_vring_addr);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Since we might want to use that mapping straight away, we have to
|
||||
* make sure the guest has already processed our SET_MEM_TABLE message.
|
||||
|
Loading…
Reference in New Issue
Block a user