Commit f3c59c4a 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.

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

 (master)

(cherry picked from commit cc7971b6)
Change-Id: Ib6387e841b7705873e84f9707a24b1552add6e24
Signed-off-by: default avatarMarek Chomnicki <marek.chomnicki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23319


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent f102e3cd
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;