From 2a99dbc79270cc2aa300d7fd444f89aba3238fd9 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Tue, 25 Jan 2022 17:08:49 +0900 Subject: [PATCH] nvmf: Support concurrent execution of multiple abort commands We did not have any practical limitation to support concurrent execution of multiple abort commands. NVMe specification recommends that implementations support a minimum of four abort commands. Let's follow the NVMe specification. As stated in the head, we do not have any limitation, and we do not have to check if abort commands exceeds ACL or not. Signed-off-by: Shuhei Matsumoto Change-Id: I31e066fadcb5d619d0c50c895c4cb64520b33513 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11232 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris --- lib/nvmf/ctrlr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/nvmf/ctrlr.c b/lib/nvmf/ctrlr.c index 0aa8d4ca8..8f0346ef0 100644 --- a/lib/nvmf/ctrlr.c +++ b/lib/nvmf/ctrlr.c @@ -65,6 +65,8 @@ #define ANA_TRANSITION_TIME_IN_SEC 10 +#define NVMF_ABORT_COMMAND_LIMIT 3 + /* * Support for custom admin command handlers */ @@ -2683,8 +2685,10 @@ spdk_nvmf_ctrlr_identify_ctrlr(struct spdk_nvmf_ctrlr *ctrlr, struct spdk_nvme_c cdata->oaes.ana_change_notices = 1; } cdata->ctratt.host_id_exhid_supported = 1; - /* TODO: Concurrent execution of multiple abort commands. */ - cdata->acl = 0; + /* We do not have any actual limitation to the number of abort commands. + * We follow the recommendation by the NVMe specification. + */ + cdata->acl = NVMF_ABORT_COMMAND_LIMIT; cdata->frmw.slot1_ro = 1; cdata->frmw.num_slots = 1;