From a7d59c9d753b9763893dddb631a4662c4ef9656c Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Thu, 9 Jul 2020 09:53:48 +0900 Subject: [PATCH] lib/nvmf: Add three variables to spdk_nvmf_request to avoid temp context for abort operation Add three variables, poller, timeout_tsc, and req_to_abort to struct spdk_nvmf_request to wait until the request to abort is abortable without using any dynamically allocated context. struct spdk_nvmf_request is already very large (968 bytes), and the pahole tool checked these variables did not create any extra hole. Poller pointer and timeout value are usable for other potential cases, and so use generic names. Signed-off-by: Shuhei Matsumoto Change-Id: I7202ade181365ab586d8c30383b3ea0fef82dcff Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3260 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- include/spdk/nvmf_transport.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/spdk/nvmf_transport.h b/include/spdk/nvmf_transport.h index 6209287a3..ceb331856 100644 --- a/include/spdk/nvmf_transport.h +++ b/include/spdk/nvmf_transport.h @@ -94,6 +94,9 @@ struct spdk_nvmf_request { struct spdk_nvmf_dif_info dif; spdk_nvmf_nvme_passthru_cmd_cb cmd_cb_fn; struct spdk_nvmf_request *first_fused_req; + struct spdk_nvmf_request *req_to_abort; + struct spdk_poller *poller; + uint64_t timeout_tsc; STAILQ_ENTRY(spdk_nvmf_request) buf_link; TAILQ_ENTRY(spdk_nvmf_request) link;