Commit 097691fc authored by Changpeng Liu's avatar Changpeng Liu Committed by Jim Harris
Browse files

vhost: do `rte_vhost_vring_call` from spdk context



Currently we will call `rte_vhost_vring_call` in the DPDK
"vhost-events" thread context when starting the device, and
DPDK vhost library already holds all VQ's access lock when
starting device, with new DPDK/dpdk@c573699 commit, it will
cause deadlock to call `rte_vhost_vring_call` in "vhost-events"
context, so here we increase 1 to `used_req_cnt` to make sure
one more `rte_vhost_vring_call` will be executed later in SPDK
thread context.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Change-Id: Iab53941942335744bf25ab6e9b8747bd08b0c698
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14328


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarDong Yi <yidong0635@126.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 9b74b4a3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1051,7 +1051,11 @@ start_device(int vid)
		 * so q->vring.desc can replace q->vring.desc_packed.
		 */
		if (q->vring.desc != NULL && q->vring.size > 0) {
			rte_vhost_vring_call(vsession->vid, q->vring_idx);
			/* Make sure a successful call of
			 * `rte_vhost_vring_call` will happen
			 * after starting the device.
			 */
			q->used_req_cnt += 1;
		}
	}