+56
−108
+15
−6
+15
−6
Loading
We will stop/start the device multiple times when a new vring is added, and also stop/start the device when set vring's callfd, actually we only need to start the device after a I/O queue is enabled, DPDK rte_vhost will not help us to start the device in some scenarios, so this is controlled in SPDK. Now we improve the workaround to make it consistent with vhost-user specification. For each SET_VRING_KICK message, we will setup the new added vring, and then we try to start the device. For each SET_VRING_CALL message, we will add one more interrupt count, previously this is done when enable the vring, which is not accurate. For each GET_VRING_BASE message, we will stop the device before the first message. With above changes, we will start/stop the device once, any new added vrings after starting the device will be polled in next `vdev_worker` poller. Change-Id: I5a87c73d34ce7c5f96db7502a68c5fa2cb2e4f74 Signed-off-by:Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14928 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Ben Walker <benjamin.walker@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>