From: Bart Van Assche <bvanassche@acm.org>
To: Leon Romanovsky <leon@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
Nicholas Bellinger <nab@linux-iscsi.org>
Cc: linux-rdma@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH rdma-next] RDMA/srpt: Pass the mapped task attribute to target_init_cmd()
Date: Tue, 21 Jul 2026 13:13:48 -0700 [thread overview]
Message-ID: <54cd4e16-f3c2-4e80-b8ab-98de3d2bd6c8@acm.org> (raw)
In-Reply-To: <20260721-b4-scsi-ordering-violation-due-to-hardc-v1-1-07205aab71bb@nvidia.com>
On 7/21/26 2:10 AM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> srpt_handle_cmd() maps the initiator-supplied srp_cmd->task_attr into
> cmd->sam_task_attr, but then hands a hardcoded TCM_SIMPLE_TAG to
> target_init_cmd().
>
> Pass the already mapped cmd->sam_task_attr instead, so target core sees the
> attribute the initiator requested.
>
> Fixes: 9474b043132f ("ib_srpt: Convert I/O path to target_submit_cmd + drop legacy ioctx->kref")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> Bart,
>
> I found this during code review, but I'm not sure what the
> original intention was.
>
> The Fixes line references the addition of MSG_SIMPLE_TAG as a
> hardcoded value. MSG_SIMPLE_TAG was later renamed to TCM_SIMPLE_TAG.
>
> Thanks
> ---
> drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index a22ee4fc1e4c..7197d95f2216 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -1602,7 +1602,7 @@ static void srpt_handle_cmd(struct srpt_rdma_ch *ch,
>
> rc = target_init_cmd(cmd, ch->sess, &send_ioctx->sense_data[0],
> scsilun_to_int(&srp_cmd->lun), data_len,
> - TCM_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF);
> + cmd->sam_task_attr, dir, TARGET_SCF_ACK_KREF);
> if (rc != 0) {
> pr_debug("target_submit_cmd() returned %d for tag %#llx\n", rc,
> srp_cmd->tag);
Although the Linux kernel SRP initiator always uses the SIMPLE tag, the
above change looks good to me. Hence:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
next prev parent reply other threads:[~2026-07-21 20:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 9:10 Leon Romanovsky
2026-07-21 20:13 ` Bart Van Assche [this message]
2026-07-22 6:15 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54cd4e16-f3c2-4e80-b8ab-98de3d2bd6c8@acm.org \
--to=bvanassche@acm.org \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®