Commit cc7971b6 authored by Changpeng Liu's avatar Changpeng Liu Committed by Tomasz Zawadzki
Browse files

lib/vhost: show default cpumask is used or not



When creating a vhost device without input the cpumask, vhost
library will use application's cpumask by default, here we
add a flag to mark this case.

Change-Id: Ib6387e841b7705873e84f9707a24b1552add6e24
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23200


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent 4199e7bb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -127,6 +127,10 @@ vhost_dev_register(struct spdk_vhost_dev *vdev, const char *name, const char *ma
			    mask_str, spdk_cpuset_fmt(&g_vhost_core_mask));
		return -EINVAL;
	}
	vdev->use_default_cpumask = false;
	if (!mask_str) {
		vdev->use_default_cpumask = true;
	}

	spdk_vhost_lock();
	if (spdk_vhost_dev_find(name)) {
+1 −0
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ struct spdk_vhost_dev {
	char *name;
	char *path;

	bool use_default_cpumask;
	struct spdk_thread *thread;

	uint64_t virtio_features;