[PATCH 02/12] libibverbs: permit jobs without an address table
From: Doug Ledford
Date: Sat Oct 31 2026 - 15:27:26 EST
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@xxxxxxx>
Signed-off-by: Iraimani P <iraimani.pavadai@xxxxxxx>
Signed-off-by: Doug Ledford <doug.ledford@xxxxxxx>
---
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