From: sashiko-bot@kernel.org
To: "Eric Curtin" <ericcurtin17@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [RFC PATCH v2 5/5] RDMA: Avoid compile-time PAGE_SIZE in FRMR pools, IPoIB and uverbs
Date: Wed, 02 Dec 2026 03:36:13 +0000 [thread overview]
Message-ID: <sashiko-outbox-244789@kernel.org> (raw)
In-Reply-To: <20261202032044.1705331-6-ericcurtin17@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] RDMA: undeclared identifier PAGE_SIZE_MIN in ipoib.h and
uverbs_ioctl.h
--
commit 9e5b709f6747c196f7838e46f6a5bb87fdb0b541
Author: Eric Curtin <eric.curtin@docker.com>
RDMA: Avoid compile-time PAGE_SIZE in FRMR pools, IPoIB and uverbs
This commit replaces compile-time uses of PAGE_SIZE in FRMR pools, IPoIB,
and uverbs with runtime allocations or PAGE_SIZE_MIN-based macros to
support boot-time page size selection.
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
> index 143e03b649021..34a19e96d0a0a 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib.h
> +++ b/drivers/infiniband/ulp/ipoib/ipoib.h
> @@ -70,8 +70,6 @@ enum {
>
> IPOIB_CM_MTU = 0x10000 - 0x10, /* padding to align header to 16 */
> IPOIB_CM_BUF_SIZE = IPOIB_CM_MTU + IPOIB_ENCAP_LEN,
> - IPOIB_CM_HEAD_SIZE = IPOIB_CM_BUF_SIZE % PAGE_SIZE,
> - IPOIB_CM_RX_SG = ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE,
> IPOIB_RX_RING_SIZE = 256,
> IPOIB_TX_RING_SIZE = 128,
> IPOIB_MAX_QUEUE_SIZE = 8192,
> @@ -118,6 +116,13 @@ enum {
> IPOIB_RTNL_CHILD = 2,
> };
>
> +#define IPOIB_CM_HEAD_SIZE ((int)(IPOIB_CM_BUF_SIZE % PAGE_SIZE))
> +#define IPOIB_CM_HEAD_SIZE_MIN ((int)(IPOIB_CM_BUF_SIZE % PAGE_SIZE_MIN))
> +#define IPOIB_CM_RX_SG \
> + ((unsigned int)(ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE) / PAGE_SIZE))
> +#define IPOIB_CM_RX_SG_MAX \
> + ((int)(ALIGN(IPOIB_CM_BUF_SIZE, PAGE_SIZE_MIN) / PAGE_SIZE_MIN))
> +
> #define IPOIB_OP_RECV (1ul << 31)
> #ifdef CONFIG_INFINIBAND_IPOIB_CM
> #define IPOIB_OP_CM (1ul << 30)
> @@ -259,7 +264,7 @@ struct ipoib_cm_tx {
>
> struct ipoib_cm_rx_buf {
> struct sk_buff *skb;
> - u64 mapping[IPOIB_CM_RX_SG];
> + u64 mapping[IPOIB_CM_RX_SG_MAX];
> };
[Severity: High]
Where is PAGE_SIZE_MIN defined?
PAGE_SIZE_MIN is not defined anywhere in the tree, so expanding
IPOIB_CM_RX_SG_MAX in struct ipoib_cm_rx_buf, IPOIB_CM_HEAD_SIZE_MIN in
ipoib_init_module(), or UVERBS_ATTR_IDRS_ARR() in
include/rdma/uverbs_ioctl.h breaks the build with an undeclared identifier
error when CONFIG_INFINIBAND_IPOIB or consumers such as
drivers/infiniband/hw/mlx5/fs.c are compiled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202032044.1705331-1-ericcurtin17@gmail.com?part=5
next prev parent reply other threads:[~2026-12-02 3:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 3:17 [RFC PATCH v2 0/5] RDMA: Prepare for boot-time page size selection on arm64 Eric Curtin
2026-12-02 3:17 ` [RFC PATCH v2 1/5] RDMA/mthca: Make the direct buffer size limits macros Eric Curtin
2026-12-02 3:17 ` [RFC PATCH v2 2/5] RDMA/mlx5: Use PAGE_SIZE_MIN/MAX in build-time page size checks Eric Curtin
2026-12-02 3:28 ` sashiko-bot
2026-12-02 3:17 ` [RFC PATCH v2 3/5] RDMA/hns: Size the doorbell bitmaps for PAGE_SIZE_MAX Eric Curtin
2026-12-02 3:29 ` sashiko-bot
2026-12-02 3:17 ` [RFC PATCH v2 4/5] RDMA/efa: Check EFA_CHUNK_PAYLOAD_SIZE against PAGE_SIZE_MIN Eric Curtin
2026-12-02 3:31 ` sashiko-bot
2026-12-02 3:17 ` [RFC PATCH v2 5/5] RDMA: Avoid compile-time PAGE_SIZE in FRMR pools, IPoIB and uverbs Eric Curtin
2026-12-02 3:36 ` sashiko-bot [this message]
2026-12-02 3:36 ` [RFC PATCH v2 0/5] RDMA: Prepare for boot-time page size selection on arm64 sashiko-bot
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-244789@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ericcurtin17@gmail.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.