From e2f42584b05987580fbfe7df6fca4f01cb2b5824 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Mon, 10 Jul 2017 11:42:54 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/368720 Tested-by: SPDK Automated Test System Reviewed-by: Pawel Wodkowski Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- lib/vhost/vhost.c | 4 ++-- lib/vhost/vhost_internal.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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))); };