From: sashiko-bot@kernel.org
To: "Showrya M N" <showrya@chelsio.com>, linux-rdma@vger.kernel.org
Subject: Re: [PATCH v3] RDMA/cxgb4: fix the length of large fast-reg MRs
Date: Thu, 03 Dec 2026 13:14:01 +0000 [thread overview]
Message-ID: <sashiko-outbox-247834@kernel.org> (raw)
In-Reply-To: <20261203222608.12907-1-showrya@chelsio.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] RDMA/cxgb4: inaccurate Fixes tag 2550a88d956f for fast-reg 8GB
limit
--
commit aee0ad15cad4c821862d1e5049a62a4e608edfbc
Author: Potnuri Bharat Teja <bharat@chelsio.com>
> RDMA/cxgb4: fix the length of large fast-reg MRs
>
> ib_mr.length is a u64 and cxgb4 advertises max_mr_size as ~0ULL, but
> build_memreg() and build_tpte_memreg() always program len_hi as 0 and
> truncate the length into len_lo. A kernel fast-reg MR of 4GB or more,
> e.g. one mapped with a large page size, is therefore registered in HW
> with a truncated length.
>
> Program len_hi/len_lo from the upper and lower 32 bits of the MR length,
> as write_tpt_entry() already does for regular MRs.
>
> Also, T4 and T5 can't handle MRs of 8GB or more. c4iw_reg_user_mr()
> already rejects such MRs via mr_exceeds_hw_limits(), but fast-reg MRs
> get their length only in c4iw_map_mr_sg() and are never checked. With
> DSGL, a fast-reg MR holds up to 128 pages of up to 128MB, so it can
> reach 16GB. Apply the same limit in c4iw_map_mr_sg() and fail the
> mapping with -EINVAL.
>
> Fixes: edd31551148c ("IB: Correct MR length field to be 64-bit")
> Fixes: 2550a88d956f ("RDMA/cxgb4: Limit MRs to < 8GB for T4/T5 devices")
> Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
> Signed-off-by: Showrya M N <showrya@chelsio.com>
[Severity: Low]
Does the second Fixes tag accurately identify the introducing commit?
At 2550a88d956f ("RDMA/cxgb4: Limit MRs to < 8GB for T4/T5 devices"),
c4iw_map_mr_sg() did not exist yet (added in 8376b86de7d3 ("iw_cxgb4:
Support the new memory registration API")), and wr.fast_reg.length was a
u32, so fast-reg MRs could never reach 8GB.
Fast-reg MRs could only reach 4GB or 8GB once ib_mr.length became u64 in
edd31551148c ("IB: Correct MR length field to be 64-bit"), which is already
cited by the first Fixes tag. Dropping the second Fixes tag avoids
misleading automated stable backporting.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203222608.12907-1-showrya@chelsio.com?part=1
next prev parent reply other threads:[~2026-12-03 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 18:56 [PATCH] RDMA/cxgb4: program the upper 32 bits of the fast-reg MR length Showrya M N
2026-12-03 9:46 ` sashiko-bot
2026-12-03 21:40 ` [PATCH v2] " Showrya M N
2026-12-03 12:26 ` sashiko-bot
2026-12-03 22:26 ` [PATCH v3] RDMA/cxgb4: fix the length of large fast-reg MRs Showrya M N
2026-12-03 13:14 ` sashiko-bot [this message]
2026-12-03 22:50 ` [PATCH v4] " Showrya M N
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=sashiko-outbox-247834@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=showrya@chelsio.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