linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Honggang LI <honli@redhat.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Leon Romanovsky <leonro@mellanox.com>,
	Doug Ledford <dledford@redhat.com>,
	linux-rdma@vger.kernel.org,
	Laurence Oberman <loberman@redhat.com>
Subject: Re: [PATCH] RDMA/srpt: Report the SCSI residual to the initiator
Date: Mon, 4 Nov 2019 08:01:26 -0800	[thread overview]
Message-ID: <489e72c9-dc15-f5af-81e6-b4f448323947@acm.org> (raw)
In-Reply-To: <20191104111024.GA31820@dhcp-128-227.nay.redhat.com>

On 11/4/19 3:10 AM, Honggang LI wrote:
> On Tue, Oct 29, 2019 at 04:02:57PM -0700, Bart Van Assche wrote:
>> The code added by this patch is similar to the code that already exists
>> in ibmvscsis_determine_resid(). This patch has been tested by running
>> the following command:
>>
>> strace -f sg_raw -r 1k /dev/sdb 12 00 00 00 60 00 -o inquiry.bin |&
>>      grep resid=
>>
>> Cc: Honggang LI <honli@redhat.com>
>> Cc: Laurence Oberman <loberman@redhat.com>
>> Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1")
>> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
>> ---
>>   drivers/infiniband/ulp/srpt/ib_srpt.c | 24 ++++++++++++++++++++++++
>>   1 file changed, 24 insertions(+)
>>
>> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
>> index a278e76b9e02..c9972b686c27 100644
>> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
>> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
>> @@ -1362,9 +1362,11 @@ static int srpt_build_cmd_rsp(struct srpt_rdma_ch *ch,
>>   			      struct srpt_send_ioctx *ioctx, u64 tag,
>>   			      int status)
>>   {
>> +	struct se_cmd *cmd = &ioctx->cmd;
>>   	struct srp_rsp *srp_rsp;
>>   	const u8 *sense_data;
>>   	int sense_data_len, max_sense_len;
>> +	int resid = cmd->residual_count;
>          ^^^
> Should be u32?	

Since se_cmd.residual_count has been declared as u32 it's probably 
better to declare this variable as u32 too. I will make that change and 
post a v2.

Thanks,

Bart.



  reply	other threads:[~2019-11-04 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 23:02 [PATCH] RDMA/srpt: Report the SCSI residual to the initiator Bart Van Assche
2019-11-04 11:10 ` Honggang LI
2019-11-04 16:01   ` Bart Van Assche [this message]
2019-11-05 21:46 Bart Van Assche
2019-11-05 21:47 ` Bart Van Assche
2019-11-06  3:13 ` Honggang LI
2019-11-14  3:53   ` Bart Van Assche
2019-11-14 14:10 ` Jason Gunthorpe

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=489e72c9-dc15-f5af-81e6-b4f448323947@acm.org \
    --to=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=honli@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=loberman@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).