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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/368720
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2017-07-10 11:42:54 +02:00 committed by Jim Harris
parent 8bf4c089f6
commit e2f42584b0
2 changed files with 5 additions and 4 deletions

View File

@ -520,9 +520,9 @@ spdk_vhost_dev_load(int vid)
return NULL; 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, SPDK_ERRLOG("vhost device %d: Too many queues (%"PRIu16"). Max %"PRIu16"\n", vid, num_queues,
MAX_VHOST_VRINGS); SPDK_VHOST_MAX_VQUEUES);
return NULL; return NULL;
} }

View File

@ -55,7 +55,7 @@
#define VIRTIO_BLK_F_CONFIG_WCE 11 #define VIRTIO_BLK_F_CONFIG_WCE 11
#endif #endif
#define MAX_VHOST_VRINGS 256 #define SPDK_VHOST_MAX_VQUEUES 256
#define SPDK_VHOST_SCSI_CTRLR_MAX_DEVS 8 #define SPDK_VHOST_SCSI_CTRLR_MAX_DEVS 8
@ -78,7 +78,8 @@ struct spdk_vhost_dev {
uint16_t num_queues; uint16_t num_queues;
uint64_t negotiated_features; 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)));
}; };