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

vhost: renamed MAX_VRINGS define to MAX_VQUEUES



Renamed it to avoid misconceptions.
Struct rte_vhost_vring describes a virtqueue, not a vring.

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


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 8bf4c089
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -520,9 +520,9 @@ spdk_vhost_dev_load(int vid)
		return NULL;
	}

	if (num_queues > MAX_VHOST_VRINGS) {
	if (num_queues > SPDK_VHOST_MAX_VQUEUES) {
		SPDK_ERRLOG("vhost device %d: Too many queues (%"PRIu16"). Max %"PRIu16"\n", vid, num_queues,
			    MAX_VHOST_VRINGS);
			    SPDK_VHOST_MAX_VQUEUES);
		return NULL;
	}

+3 −2
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
#define VIRTIO_BLK_F_CONFIG_WCE	11
#endif

#define MAX_VHOST_VRINGS	256
#define SPDK_VHOST_MAX_VQUEUES	256

#define SPDK_VHOST_SCSI_CTRLR_MAX_DEVS 8

@@ -78,7 +78,8 @@ struct spdk_vhost_dev {

	uint16_t num_queues;
	uint64_t negotiated_features;
	struct rte_vhost_vring virtqueue[MAX_VHOST_VRINGS] __attribute((aligned(SPDK_CACHE_LINE_SIZE)));
	struct rte_vhost_vring virtqueue[SPDK_VHOST_MAX_VQUEUES] __attribute((aligned(
				SPDK_CACHE_LINE_SIZE)));
};