Re: [PATCH 05/11] nvmet: Add install_queue callout
From: Max Gurtovoy <hidden>
Date: 2018-11-17 22:36:59
Also in:
linux-block, linux-nvme
From: Max Gurtovoy <hidden>
Date: 2018-11-17 22:36:59
Also in:
linux-block, linux-nvme
On 11/15/2018 7:16 PM, Sagi Grimberg wrote:
nvmet-tcp will implement it to allocate queue commands which are only known at nvmf connect time (sq size). Signed-off-by: Sagi Grimberg <redacted> --- drivers/nvme/target/fabrics-cmd.c | 9 +++++++++ drivers/nvme/target/nvmet.h | 1 + 2 files changed, 10 insertions(+)diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c index 1f05d8507e35..a84668e8939c 100644 --- a/drivers/nvme/target/fabrics-cmd.c +++ b/drivers/nvme/target/fabrics-cmd.c@@ -117,6 +117,15 @@ static u16 nvmet_install_queue(struct nvmet_ctrl *ctrl, struct nvmet_req *req) nvmet_sq_setup(ctrl, req->sq, qid, sqsize + 1, !!(c->cattr & NVME_CONNECT_DISABLE_SQFLOW));
what is your code base ? does SQFLOW must for TCP ?
+ if (ctrl->ops->install_queue) {
+ int ret = ctrl->ops->install_queue(req->sq);
+ if (ret) {
+ pr_err("failed to install queue %d cntlid %d ret %d\n",
+ qid, ret, ctrl->cntlid);
+ return NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR;I'm not sure regarding the INVALID_PARAM rc. maybe use NVME_SC_INTERNAL ? otherwise, look fine, Reviewed-by: Max Gurtovoy <redacted>