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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/399457 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
db0c317436
commit
9f0a73d901
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user