From: Bart Van Assche <bvanassche@acm.org>
To: Yehyeong Lee <yhlee@isslab.korea.ac.kr>
Cc: Leon Romanovsky <leon@kernel.org>, Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 1/2] RDMA/srpt: bound the indirect descriptor table to the IU
Date: Thu, 22 Oct 2026 08:56:12 -0700 [thread overview]
Message-ID: <ea3e91af-53b7-419c-b83e-d70d002ea321@acm.org> (raw)
In-Reply-To: <20261022143901.2991062-2-yhlee@isslab.korea.ac.kr>
On 10/22/26 7:39 AM, Yehyeong Lee wrote:
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 7197d95f2216b..97758082f71d2 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -1117,6 +1117,8 @@ static int srpt_get_desc_tbl(struct srpt_recv_ioctx *recv_ioctx,
> struct srp_indirect_buf *idb = srpt_get_desc_buf(srp_cmd);
> int nbufs = be32_to_cpu(idb->table_desc.len) /
> sizeof(struct srp_direct_buf);
> + int desc_off = (u8 *)idb - (u8 *)srp_cmd;
The idiomatic way in the kernel for subtracting pointers is to convert
these to uintptr_t instead of u8 * before subtracting.
Thanks,
Bart.
next prev parent reply other threads:[~2026-10-22 15:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 14:38 [PATCH v3 0/2] RDMA/srpt: fix the indirect descriptor table bound and the context counters Yehyeong Lee
2026-10-22 14:39 ` [PATCH v3 1/2] RDMA/srpt: bound the indirect descriptor table to the IU Yehyeong Lee
2026-10-22 15:56 ` Bart Van Assche [this message]
2026-10-22 18:15 ` Yehyeong Lee
2026-10-22 14:39 ` [PATCH v3 2/2] RDMA/srpt: widen the indirect RDMA context counters Yehyeong Lee
2026-10-22 15:57 ` Bart Van Assche
2026-10-22 18:15 ` Yehyeong Lee
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=ea3e91af-53b7-419c-b83e-d70d002ea321@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=stable@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
--cc=yhlee@isslab.korea.ac.kr \
/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®