Commit 9f0a73d9 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

vhost: vhost_dev_get_cpumask now returns const spdk_cpuset *



The cpuset API is const-aware, so we can safely
return const cpuset here. This will simplify
future usages of this function - for now it remains
unused.

Change-Id: If849ed49056a54035fb7a6eccde84121630f9974
Signed-off-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/399457


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent db0c3174
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -107,10 +107,9 @@ const char *spdk_vhost_dev_get_name(struct spdk_vhost_dev *vdev);
 * of SPDK app cpuset vhost was started with.
 *
 * \param dev vhost device
 * \param cpuset pointer to the cpuset of the vdev.
 * \return cpuset of the vdev.
 */
void spdk_vhost_dev_get_cpumask(struct spdk_vhost_dev *vdev,
				struct spdk_cpuset *cpuset);
const struct spdk_cpuset *spdk_vhost_dev_get_cpumask(struct spdk_vhost_dev *vdev);

/**
 * By default, events are generated when asked, but for high queue depth and
+3 −4
Original line number Diff line number Diff line
@@ -765,12 +765,11 @@ spdk_vhost_dev_get_name(struct spdk_vhost_dev *vdev)
	return vdev->name;
}

void
spdk_vhost_dev_get_cpumask(struct spdk_vhost_dev *vdev, struct spdk_cpuset *cpumask)
const struct spdk_cpuset *
spdk_vhost_dev_get_cpumask(struct spdk_vhost_dev *vdev)
{
	assert(vdev != NULL);
	assert(cpumask != NULL);
	spdk_cpuset_copy(cpumask, vdev->cpumask);
	return vdev->cpumask;
}

static uint32_t