mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Doug Ledford <doug.ledford@hpe.com>
To: <linux-rdma@vger.kernel.org>, <slingshot-os-team@groups.ext.hpe.com>
Cc: <linux-kernel@vger.kernel.org>,
	Doug Ledford <doug.ledford@hpe.com>,
	Iraimani P <iraimani.pavadai@hpe.com>
Subject: [PATCH 02/12] libibverbs: permit jobs without an address table
Date: Sat, 31 Oct 2026 12:25:55 -0700	[thread overview]
Message-ID: <20261031-cxi-for-next-v1-2-93ce01907ce2@hpe.com> (raw)
In-Reply-To: <20261031-cxi-for-next-v1-0-93ce01907ce2@hpe.com>

The job address table stores indexed remote fabric endpoints using
address-handle attributes and a remote QPN. Its entry count is not a
limit on memory regions, mapped pages, or ATU translation contexts.

Cassini transmit commands carry a destination fabric address directly.
The CXI provider currently supports address-handle-based sends, not the
job address-table operations or indexed sends. The documented hardware
transmit interface exposes no equivalent programmable peer table.
Connection/retry state is not a replacement for it. Native memory
translation and resource accounting are separate ATU operations.

Do not reject an address-handle-only job merely because it requests no
peer-table entries. Dispatch allocation to the provider, which supplies
the mandatory MAX_ADDR_ENTRIES uverbs attribute explicitly as zero when
the caller omits it. The companion core change permits zero and retains
the device upper bound and job-allocation privilege checks. Jobs still
carry a JobID and use job keys; CXI indexed sends remain unsupported.

This relaxes the shared libibverbs allocation contract and needs review
together with the corresponding core API policy change.

Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
---
 libibverbs/man/ibv_alloc_job.3.md | 8 +++++---
 libibverbs/verbs.c                | 7 -------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/libibverbs/man/ibv_alloc_job.3.md b/libibverbs/man/ibv_alloc_job.3.md
index 2be8e482c4cf..e90f025e5357 100644
--- a/libibverbs/man/ibv_alloc_job.3.md
+++ b/libibverbs/man/ibv_alloc_job.3.md
@@ -97,9 +97,11 @@ struct ibv_job_attr {
 
 *max_addr_entries*
 :	Number of entries in the job address table. Selected by
-	*IBV_JOB_ATTR_MAX_ADDR_ENTRIES*, which allocation requires. It MUST be
-	non-zero and MUST NOT exceed the *max_addr_entries* limit reported by
-	**ibv_query_device_ex**(3). See **ibv_insert_addr**(3).
+	*IBV_JOB_ATTR_MAX_ADDR_ENTRIES*. Omitting this member or specifying zero
+	creates a job without an address table; work requests must then use
+	explicit address handles. Consumers using indexed addresses must request
+	a positive capacity. The capacity MUST NOT exceed the *max_addr_entries*
+	limit reported by **ibv_query_device_ex**(3). See **ibv_insert_addr**(3).
 
 *port_num*
 :	Device port the job is associated with. Selected by
diff --git a/libibverbs/verbs.c b/libibverbs/verbs.c
index 1df4dbf94dcc..b2f9f4e3f8c0 100644
--- a/libibverbs/verbs.c
+++ b/libibverbs/verbs.c
@@ -321,13 +321,6 @@ struct ibv_job *ibv_alloc_job(struct ibv_context *context,
 		return NULL;
 	}
 
-	/* the address table is sized once, when the job is allocated */
-	if (!(attr->comp_mask & IBV_JOB_ATTR_MAX_ADDR_ENTRIES) ||
-	    !attr->max_addr_entries) {
-		errno = EINVAL;
-		return NULL;
-	}
-
 	job = vctx->alloc_job(context, attr, user_context);
 	if (job) {
 		job->context = context;

-- 
2.56.0


  parent reply	other threads:[~2026-10-31 19:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31 19:25 [PATCH 00/12] cxiverbs: add the HPE Cassini verbs provider Doug Ledford
2026-10-31 19:25 ` [PATCH 01/12] libibverbs: add ibv_read_counters_ex() Doug Ledford
2026-10-31 19:25 ` Doug Ledford [this message]
2026-10-31 19:25 ` [PATCH 03/12] libibverbs: support provider completion channels and Slingshot transport Doug Ledford
2026-10-31 19:25 ` [PATCH 04/12] cxiverbs: add the synchronized native hardware and verbs headers Doug Ledford
2026-10-31 19:25 ` [PATCH 05/12] cxiverbs: define the native direct-verbs resource interface Doug Ledford
2026-10-31 19:25 ` [PATCH 06/12] cxiverbs: encode list entries and VNI-isolated remote keys Doug Ledford
2026-10-31 19:26 ` [PATCH 07/12] cxiverbs: add the provider and device discovery Doug Ledford
2026-10-31 19:26 ` [PATCH 08/12] cxiverbs: implement UET verbs with explicit native ownership Doug Ledford
2026-10-31 19:26 ` [PATCH 09/12] cxiverbs: cover identity isolation and polling and event traffic Doug Ledford
2026-10-31 19:26 ` [PATCH 10/12] cxiverbs: launch Slurm-style exact VNI TC and resource grants Doug Ledford
2026-10-31 19:26 ` [PATCH 11/12] cxiverbs: wire and package the CXI verbs provider and tests Doug Ledford
2026-10-31 19:26 ` [PATCH 12/12] libibverbs: port RU examples to explicitly granted resources Doug Ledford

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=20261031-cxi-for-next-v1-2-93ce01907ce2@hpe.com \
    --to=doug.ledford@hpe.com \
    --cc=iraimani.pavadai@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=slingshot-os-team@groups.ext.hpe.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

all inboxes | Powered by JetHome®