From a595959da0129dbe394158d3735db9fdaddfa258 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Fri, 16 Jul 2021 19:38:55 +0000 Subject: [PATCH] test/nvme/abort: ensure admin queue is sized appropriately This abort test app will send a lot of abort commands on the admin queue. The default admin queue size is relatively small (32) so increase it if necessary to account for the expected number of outstanding abort commands as well as any extra admin commands that may be sent during test execution such as Keep Alive. Fixes issue #2048. Signed-off-by: Jim Harris Change-Id: I5f64b7fc72a028299b860f09e30d430a64c95d2a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8812 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Paul Luse Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto Reviewed-by: Aleksey Marchuk Reviewed-by: Dong Yi Reviewed-by: Ben Walker --- examples/nvme/abort/abort.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/nvme/abort/abort.c b/examples/nvme/abort/abort.c index 906f7ab83..d4e9f50b6 100644 --- a/examples/nvme/abort/abort.c +++ b/examples/nvme/abort/abort.c @@ -846,6 +846,14 @@ static bool probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, struct spdk_nvme_ctrlr_opts *opts) { + uint16_t min_aq_size; + + /* We need to make sure the admin queue is big enough to handle all of the aborts that + * will be sent by this test app. We add a few extra entries to account for any admin + * commands other than the aborts. */ + min_aq_size = spdk_divide_round_up(g_queue_depth, g_abort_interval) + 8; + opts->admin_queue_size = spdk_max(opts->admin_queue_size, min_aq_size); + return true; }