diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c index b6e6a05bc..a14bf4ef8 100644 --- a/lib/vhost/vhost.c +++ b/lib/vhost/vhost.c @@ -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; } diff --git a/lib/vhost/vhost_internal.h b/lib/vhost/vhost_internal.h index 670e211ad..41369514f 100644 --- a/lib/vhost/vhost_internal.h +++ b/lib/vhost/vhost_internal.h @@ -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))); };