From 7aa1650d281e1dfcd4526baf8f92ad1813c95adf Mon Sep 17 00:00:00 2001 From: paul luse Date: Fri, 28 Jan 2022 16:19:51 -0700 Subject: [PATCH] idxd: minor one LOC cleanup We always set num_batches to the same value we set num_descriptors so just make it explicit. Makes it easier to experiment with different values when performance testing. Signed-off-by: paul luse Change-Id: I648262001772c791a032d6cab38dc3b03c1d55c1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11354 Tested-by: SPDK CI Jenkins Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- lib/idxd/idxd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/idxd/idxd.c b/lib/idxd/idxd.c index b325cb339..53e8b127a 100644 --- a/lib/idxd/idxd.c +++ b/lib/idxd/idxd.c @@ -185,7 +185,7 @@ spdk_idxd_get_channel(struct spdk_idxd_device *idxd) } /* Allocate batches */ - num_batches = idxd->queues[idxd->wq_id].wqcfg.wq_size / idxd->chan_per_device; + num_batches = num_descriptors; chan->batch_base = calloc(num_batches, sizeof(struct idxd_batch)); if (chan->batch_base == NULL) { SPDK_ERRLOG("Failed to allocate batch pool\n");