Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Andrei-Alexandru Bleortu <me@andrei-z.com>,
	Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
	Sagi Grimberg <sagi@grimberg.me>,
	Max Gurtovoy <mgurtovoy@nvidia.com>,
	"Md. Haris Iqbal" <haris.iqbal@ionos.com>,
	Jack Wang <jinpu.wang@ionos.com>,
	linux-rdma@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 2/3] RDMA/srp: Post command IUs inline
Date: Thu, 15 Oct 2026 10:24:22 -0700	[thread overview]
Message-ID: <fa01c872-9d1d-4b60-b994-08ba86a5ebaa@acm.org> (raw)
In-Reply-To: <20261015125118.2966247-3-me@andrei-z.com>

On 10/15/26 5:51 AM, Andrei-Alexandru Bleortu wrote:
> +/*
> + * The verbs API cannot report a device's inline data limit. Some drivers
> + * have a fixed one: Intel irdma 216, 101 or 48 depending on the
> + * generation, Alibaba erdma 96. Try those first, by vendor ID, then step
> + * down SRP_INLINE_STEP bytes at a time to zero. libfabric's verbs
> + * provider also probes the limit (vrb_find_max_inline()).
> + */
> +static const struct {
> +	u32	vendor_id;
> +	u32	max_inline;
> +} srp_inline_limits[] = {
> +	{ PCI_VENDOR_ID_INTEL, 216 },
> +	{ PCI_VENDOR_ID_INTEL, 101 },
> +	{ PCI_VENDOR_ID_INTEL, 48 },
> +	{ PCI_VENDOR_ID_ALIBABA, 96 },
> +};

A table like the above makes maintenance of the RDMA subsystem harder
than necessary. Shouldn't a mechanism be added for querying this
information from the RDMA adapter?

> +	 * Ask for enough inline data to post command IUs inline (see
> +	 * srp_post_send()), or for as much as the device accepts.
> +	 */
> +	cap = init_attr->cap;
> +	inline_size = srp_inline_size(attr->vendor_id, SRP_MAX_INLINE_DATA,
> +				      false);
> +	for (;;) {
> +		init_attr->cap = cap;
> +		init_attr->cap.max_inline_data = inline_size;
> +		ret = srp_create_qp(ch, init_attr, &qp);
> +		if (!ret || !inline_size)
> +			break;
> +		inline_size = srp_inline_size(attr->vendor_id, inline_size,
> +					      true);
>   	}

What changes in the RDMA core would be needed to eliminate this loop?

Thanks,

Bart.

  parent reply	other threads:[~2026-10-15 17:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 12:51 [PATCH RFC 0/3] RDMA: Post small ULP command messages inline Andrei-Alexandru Bleortu
2026-10-15 12:51 ` [PATCH RFC 1/3] IB/iser: Post header-only PDUs inline Andrei-Alexandru Bleortu
2026-10-15 13:01   ` sashiko-bot
2026-10-15 13:32     ` Andrei-Alexandru Bleortu
2026-10-15 14:08       ` Andrei-Alexandru Bleortu
2026-10-15 12:51 ` [PATCH RFC 2/3] RDMA/srp: Post command IUs inline Andrei-Alexandru Bleortu
2026-10-15 13:02   ` sashiko-bot
2026-10-15 17:24   ` Bart Van Assche [this message]
2026-10-15 18:22     ` Andrei-Alexandru Bleortu
2026-10-15 12:51 ` [PATCH RFC 3/3] RDMA/rtrs: Post client read requests inline Andrei-Alexandru Bleortu
2026-10-15 13:07   ` 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=fa01c872-9d1d-4b60-b994-08ba86a5ebaa@acm.org \
    --to=bvanassche@acm.org \
    --cc=haris.iqbal@ionos.com \
    --cc=jgg@ziepe.ca \
    --cc=jinpu.wang@ionos.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=me@andrei-z.com \
    --cc=mgurtovoy@nvidia.com \
    --cc=sagi@grimberg.me \
    /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