Repository navigation
Conversation
To commit: "RDMA/core: attach a memory region to a queue pair" Signed-off-by: Eric Davis <eric.davis@broadcom.com>
Ultra Ethernet endpoints are addressed by IP rather than by an
InfiniBand or RoCE GID, and the transport distinguishes two
flavors: UDP encapsulation and plain IP.
Add IBV_GID_TYPE_UET_{UDP,IP} to the ibv_gid_type enum and the
corresponding IBV_GID_TYPE_SYSFS_UET_* values to the internal sysfs
enum. Updated ibv_devinfo to understand them and print in address
form.
Signed-off-by: Eric Davis <eric.davis@broadcom.com>
Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Report the Ultra Ethernet features a device implements so an
application can check them before using the corresponding verbs:
reliable unconnected (RU) QPs, 64-bit immediate data, 64-bit memory
keys, application-assigned RKeys, and MR access classes.
Added IBV_DEVICE_{RU,IMM64,KEY64,USER_RKEY} to the extended device
capability flags, together with the four memory region access classes
a device may offer: unrestricted, job restricted, QP restricted, and
restricted to both. Added the max_job_ids, max_job_keys, and
max_addr_entries limits to ibv_device_attr_ex and reported them from
query_device_any. Updated ibv_devinfo to print them as well.
Signed-off-by: Eric Davis <eric.davis@broadcom.com>
Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Ultra Ethernet QPs expose the message ordering and delivery guarantees they provide rather than implying them from the QP type. An application can discover what a device actually offers before it relies on it. Added the struct ibv_qp_semantics describing message ordering, the RDMA size limits, the maximum PDU, immediate data width, and usage flags together with the ibv_query_qp_semantics() wrapper and the provider op behind it. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
An Ultra Ethernet address handle carries the destination QP number alongside the usual address vector, so that a single handle fully identifies a remote endpoint (i.e., QPN = PIDonFEP and Resource Index). Add struct ibv_ah_attr_ex, which extends struct ibv_ah_attr with remote_qpn, and struct ibv_ah_ex, which extends struct ibv_ah the same way. ibv_create_ah_ex() creates one via the new provider op and ibv_ah_to_ah_ex() recovers the extended handle from its base. Both are exported from a new IBVERBS_1.19 symbol version node. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
An Ultra Ethernet job groups the endpoints that may communicate with one another. Membership is proven by a job key, and peers may be named by an index into a per-job address table rather than by a full address on every work request. Add structs ibv_job and ibv_job_key together with the verbs to manage them. ibv_alloc_job(), ibv_dealloc_job(), ibv_query_job(), ibv_export_job(), and ibv_import_job() for the job itself. ibv_create_jkey() and ibv_destroy_jkey() for its keys. ibv_insert_addr(), ibv_remove_addr(), and ibv_query_addr() for the job address table. The job and job key entry points are exported from IBVERBS_1.19. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Ultra Ethernet memory keys are 64 bits wide. Append lkey64/rkey64 to struct ibv_mr rather than widening the existing fields; the 32 bit keys keep their original offset so applications compiled against the old headers keep reading the right fields. struct ibv_mr grows from 48 to 64 bytes, which is invisible to applications since they only ever hold a pointer returned by the library. struct ibv_sge cannot be extended the same way. It is passed as an array through ibv_post_send() and ibv_post_recv(), so appending a member changes the stride of that array and breaks the ABI for callers that are not recompiled. Leave it untouched and add struct ibv_sge64, carrying a 64 bit LKey, as a distinct type. Sends select between the two element types with the new IBV_SEND_SGE64 send flag, which reinterprets the scatter/gather pointer as ibv_send_wr.sg64_list. Both arms of that union are pointers, so struct ibv_send_wr does not grow and no field offsets move. Receives have no equivalent. struct ibv_recv_wr has no flags member to carry such a selector and cannot grow without the same stride problem, so 64 bit receives use a new struct ibv_recv_wr64 posted with ibv_post_recv64(). The legacy ibv_post_recv() dispatches through struct ibv_context_ops, which is frozen, so the new verb is routed through the extended ops instead. Shared receive queues and work queues are not covered. Devices reporting IBV_DEVICE_KEY64 use the 64-bit members. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com> Signed-off-by: Eric Spada <eric.spada@broadcom.com>
Ultra Ethernet memory regions carry three extra properties. They may be restricted to a job, they may be given an application-assigned RKey, and a region may be derived from an existing one to expose a narrower window of it. Extend struct ibv_mr_init_attr with a job_key, rkey, cur_mr and derive_cnt, guarded by the new IBV_REG_MR_MASK_* bits. Propagate them through ibv_reg_mr_ex(). Also added ibv_attach_mr() and ibv_detach_mr() so a region can be bound to and released from a QP. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Reliable Unconnected (RU) is the QP type used by Ultra Ethernet. Unlike RC it does not guarantee ordering between messages and a single QP talks to many peers. The remote endpoint is named per work request rather than by connecting the QP. Added IBV_QPT_RU and the macros describing how an RU QP number encodes its UET defined PIDonFEP and Resource Index (plus an absolute-addressing flag). Extend struct ibv_qp_init_attr_ex with the QP attributes and semantics to apply at creation, the source ID, and the job key that authorizes the QP, guarded by the new IBV_QP_INIT_ATTR_* bits. RU QPs are able to transition directly to the RTS state when created. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Add the command layer behind ibv_query_qp_semantics(). Build the QUERY_QP_SEMANTICS method, send it, and copy the guarantees the device reports back into the caller's structure. Truncated to the length it asked for so an older caller keeps working. Only IBV_QPT_RU is accepted, every other type returns EOPNOTSUPP. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
copy_modify_qp_fields() turns a set of QP attributes and a mask into the fields of a modify command. Queue pair creation needs the same work for a transport that reaches RTS as soon as the pair exists, so give it external linkage and pass the QP handle rather than the QP, at creation there is no QP yet. No functional change. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
A transport with nothing to negotiate can have a queue pair ready to send the moment it exists, leaving the modify sequence with nothing to carry. Let creation take the attributes that a modify sequence would have supplied and send them with the create command. They are filled by copy_modify_qp_fields(), the same code the modify command uses, with a zero handle. The create is what makes the handle, and the kernel refuses a create that names one. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
An RU QP names its peer per work request rather than per connection. Ultra Ethernet also allows 64-bit memory keys and 64-bit immediate data, in any combination. Added the ru and ru_rdma (send/rdma ops) to struct ibv_send_wr for the legacy post path. Added the corresponding builders to struct ibv_qp_ex: ibv_wr_set_ru_addr() and ibv_wr_set_job_key() to name the peer and authorize the request, ibv_wr_set_sge64() for a 64-bit LKey, and the rdma_read64/rdma_write64/write_imm64/write64_imm/write64_imm64 and send_imm64 variants covering 64-bit keys and immediates. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
An Ultra Ethernet completion can carry 64-bit immediate data, and
identifies the sender by its job and source ID rather than by a
connected QP.
Added IBV_WC_EX_WITH_{IMM64,SRC_ID,JOB_ID} so a CQ can be created
to request them, and added ibv_wc_read_imm64_data(), ibv_wc_read_job_id()
and ibv_wc_read_src_id() to read them back.
Signed-off-by: Eric Davis <eric.davis@broadcom.com>
Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Added a ping-pong test program for RU QPs, modelled on ibv_rc_pingpong. It exercises the UET verbs features in the preceding patches. It allocates a job and a job key, creates an RU QP with either an application-specified or a provider-assigned QP number, names the peer with an extended address handle, and exchanges messages using either the legacy post path or the work request builders, optionally with 32-bit or 64-bit immediate data and multiple scatter/gather entries. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Added an RMA test program for RU QPs covering the remote memory operations added in the preceding patches. RDMA read and write with 32-bit or 64-bit RKeys, write with 32-bit or 64-bit immediate data, and multiple scatter/gather entries. It also exercises the memory region and addressing features: plain, derived, job-restricted, user-assigned-RKey MRs, the job address table as an alternative to a per-request address handle, and absolute peer addressing. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Add ibv_uet(7) and man pages for the new job, job key, address table, extended address handle, MR attach, and QP semantics verbs. Document the UET/RU additions to the existing pages, and add man pages for the new ibv_ru_pingpong and ibv_ru_rma apps. Signed-off-by: Eric Davis <eric.davis@broadcom.com> Signed-off-by: Cedell Alexander <cedell.alexander@broadcom.com>
Wrap the objects and attributes the Ultra Ethernet verbs add: jobs and their address tables, job keys, extended address handles, and the guarantees a queue pair type reports. Queue pair creation and memory registration gain the arguments that go with them, so a test can drive the whole set from Python. Signed-off-by: Eric Davis <eric.davis@broadcom.com>
Cover the objects the previous patch wraps: jobs and their address tables, job keys, queue pairs and their semantics, protection domain and memory region id spaces, device attributes, and loopback traffic. Gated on IBV_DEVICE_RU rather than on a vendor and part id, so any device advertising reliable unconnected support runs them. Signed-off-by: Eric Davis <eric.davis@broadcom.com>
The reliable unconnected verbs for Ultra Ethernet grow three structures a provider allocates: ibv_qp_ex, ibv_cq_ex, and ibv_mr, each embedded by value in verbs_qp, verbs_cq, and verbs_mr. The provider suffix carries this version, so bumping it keeps a provider built against the old layout from being loaded against the new library. Record the new IBVERBS_1.19 entry points and the private version in the Debian symbols file, and pair the Breaks with the new suffix. Signed-off-by: Eric Davis <eric.davis@broadcom.com>
Expose the counters read extension of the kernel. ibv_read_counters_ex() reads a caller chosen list of driver defined counter items into a values array and, optionally, a timestamps array holding the time in nanoseconds each item was sampled. It is implemented with the optional ITEMS and TIMESTAMPS attributes of the existing counters read method, and is dispatched to a new read_counters_ex provider op. It returns EOPNOTSUPP when the provider or kernel lacks it. The new provider op and ibv_cmd_read_counters_ex() extend the private provider ABI. IBVERBS_PABI_VERSION is deliberately not bumped: the UET series this is based on already raised it to 66 and 66.0 has not been released, so these additions join that unreleased private ABI. Signed-off-by: Doug Ledford <doug.ledford@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>
Two independent additions the cxiverbs provider needs from libibverbs. They are kept together because both are small and neither is useful without the provider. Slingshot transport: add IBV_NODE_SLINGSHOT, IBV_TRANSPORT_SLINGSHOT and the IBV_GID_TYPE_SLINGSHOT_UFH GID type, together with the sysfs name "SLINGSHOT UFH" that the kernel reports for it. The kernel header mirrors that define the matching RDMA_NODE_SLINGSHOT and IB_UVERBS_GID_TYPE_SLINGSHOT_UFH values (rdma_netlink.h and ib_user_ioctl_verbs.h) are updated here, byte for byte from the kernel. Provider completion channels: add create_comp_channel and destroy_comp_channel to the provider ops. The default implementation returns EOPNOTSUPP and libibverbs then falls back to the kernel uverbs implementation, so existing providers are unaffected. The CXI hardware delivers completions through its own event queues and needs to supply the channel itself. As with read_counters_ex, the new ops join the private ABI that the unreleased UET series already bumped to 66, so IBVERBS_PABI_VERSION is not bumped again. The sysfs GID type attribute is read into a 16 byte buffer; the previous 11 bytes truncated "SLINGSHOT UFH" and made the type unrecognisable. 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>
Add the headers the cxiverbs provider is built on. kernel-headers/rdma/cxiverbs-abi.h and kernel-headers/ethernet/cassini_user_defs.h are copies of the kernel's UAPI headers and must be updated together with them. providers/cxi/ cxiverbs-abi.h is a thin wrapper that exposes the ABI under the name the provider includes. providers/cxi/cxi_prov_hw.h is a copy of the kernel's include/linux/hpe/cxi/cxi_prov_hw.h. It differs from it in two places only: a prologue that supplies the kernel integer types and errno/string headers for user space, and the include path of cassini_user_defs.h. cxi.h holds the provider's private structures and the QPN encoding and cxi_verbs.h the provider-visible verbs extensions. The provider is named cxiverbs, not cxi, so that it does not collide with libcxi.so, which is built from a separate project and links against this provider's direct verbs API. checkpatch (rdma-core CI settings) still reports PREFER_DEFINED_ATTRIBUTE_MACRO (27) and VOLATILE (2) in this patch. They are intentional, documented in providers/cxi/utils/README.md: the imported UAPI and hardware headers use portable __attribute__((packed)) because kernel-private __packed is not available to userspace, and the command-queue status and event write-back fields keep volatile because the device updates them. If reviewers prefer a different form, it needs coordination with the internal repositories these headers are synchronized from and will be changed in V2. 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>
Add cxidv.h, the public direct verbs API of the provider. The CXI hardware has resources that verbs has no object for (services, LNIs, communication profiles, event queues, command queues, counting events, wait objects, CSR mappings and PIDs), and a privileged consumer such as a workload manager or the libcxi library needs to provision and use them explicitly. This header defines those entry points and their attribute structures. The telemetry of the NIC is part of the interface. cxidv_telem.h names every telemetry item and the predefined item sets, and cxi_telem.c maps names to items and sets, so a monitor reads telemetry with ibv_read_counters_ex() and needs no per-file sysfs interface. Ownership is explicit throughout: nothing is created as a side effect of opening the device or allocating a PD. An LNI is allocated against a service, a PD is allocated from an LNI, and the device-wide PID is bound to the PD. Every cxidv_alloc_*() has a matching cxidv_destroy_*(). The additions for retry-handler style consumers are privileged: cxidv_map_csrs() and the checked cxidv_read_csr()/cxidv_write_csr() accessors, event queues registered with the PCT, pollable wait descriptors, target and restricted trigger command queues, counting events with a caller supplied write-back page, and the administrative inbound wait. Each requires CAP_SYS_ADMIN in the kernel. 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>
Add cxi_le.h, which encodes receive list entries and remote keys. A logical remote key is at most 48 bits. The wire key is the logical key shifted left by 16 with the job's VNI in the low 16 bits, and the list entry clears the ignore bits covering the VNI so it is always compared. A logical key that does not fit is rejected with EOPNOTSUPP rather than truncated, and a zero key is rejected with EINVAL, because zero match bits are reserved for receives that do not use a key. The helpers return negative errno values like the rest of the hardware interface; the verbs entry points negate them before setting errno. 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>
Add the provider skeleton: registration with libibverbs, device matching, context allocation and the context operations. Allocating the context takes the QP table and MR list locks; a failure of either pthread_spin_init() is now handled, destroying the first lock if the second fails. The context free callback is registered in the context operations so ibv_close_device() releases the provider context, the verbs private state, the file descriptors and the device reference, instead of falling through to the default no-op. Co-developed-by: Mamila Santosh <santosh-kumar.mamila@hpe.com> Signed-off-by: Mamila Santosh <santosh-kumar.mamila@hpe.com> 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>
Implement the verbs for the UET reliable unconnected (RU) queue pair type on top of the kernel driver: contexts, jobs and job keys, PDs, MRs, CQs, QPs, address handles, work request posting and completion polling, and the direct verbs declared in cxidv.h. A few things in this file look odd and are intentional: - Completions are produced from the CXI event queue by this provider, not by the kernel, so poll and post run entirely in user space. A shared CQ uses a stable per-slot cookie in the command user pointer so the right send work request is matched when several QPs post to it. - A receive completion with C_RC_ENTRY_NOT_FOUND does not consume the posted receive; the next valid message can still match it. - The job key wrapper is allocated before the kernel call so an allocation failure cannot leave a kernel handle without an owner. - Failure unwind in the EQ, CT and CMDQ allocation paths frees the user object and its mappings even when the kernel destroy fails; the kernel object is then reclaimed when the context closes. The public destroy functions still keep the object on failure so the caller can retry. - Errors from the native command emitters are negative errno values and are negated before being stored in errno. - The data path does no environment lookups or stdio. Support optional indexed job addresses with pre-lock lookup and staged extended submissions. Release local CT and CMDQ mappings on teardown even when the kernel handle is invalid or disassociated. Co-developed-by: Mamila Santosh <santosh-kumar.mamila@hpe.com> Signed-off-by: Mamila Santosh <santosh-kumar.mamila@hpe.com> 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>
Add cxi_le_test, a test for the provider. Run with no arguments it exercises the list entry and key model and needs no hardware. With --resources DEVICE it drives a real device (service, LNI, PID, QP, job and key lifecycle, VNI isolation, send/receive data and completions) and with --csr DEVICE the privileged CSR mapping. The hardware modes require root and an idle device. Setting CXI_TEST_WRONG_VNI in the environment adds a negative pass in which a receive posted under one job must not match traffic from another. 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>
Add cxi_launcher, which provisions a service and job grant for a single test process and then runs it. It stands in for a workload manager when testing the provider without one: it creates a service restricted to the target UID with exact VNIs, traffic classes and resource limits, exports a job grant, drops privileges for the child and removes the service when the child exits. The cxi_telem utility, a small telemetry dumper built on ibv_read_counters_ex(), is added with it. The environment the child sees follows the Slingshot names (SLINGSHOT_SVC_IDS, SLINGSHOT_VNIS, SLINGSHOT_TCS, SLINGSHOT_DEVICES) plus the UET_* names the RU examples read. It is meant for developer testing. It must be run by root and exits at once otherwise, and refuses to run setuid or with file capabilities. It keeps root only for service and job setup and cleanup. The forked child closes every descriptor but stdio and the job grant, drops groups, gid and uid irreversibly and sets no_new_privs; the job runs as root only if --uid 0 is given. Inherited UET_*, SLINGSHOT_* and CXI_VERBS_* variables are scrubbed first. README.md describes the options. checkpatch (rdma-core CI settings) still reports VOLATILE (2) in this patch. Both are intentional, documented in providers/cxi/utils/README.md: the launcher's state is volatile sig_atomic_t because it is shared with its signal handler. If reviewers prefer a different form, it needs coordination with the internal repositories and will be changed in V2. 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>
Add the build files for the provider, its tests and the launcher and
publish the new headers. The provider is a shared provider library
libcxiverbs that exports the cxidv_* symbols. Like the other hardware
providers it uses util/udma_barrier.h, so it is built only where
HAVE_COHERENT_DMA is set.
The LNI and PID bindings the pyverbs RU tests need call the cxidv API,
so they live in a pyverbs.providers.cxi.cxidv module, built alongside
the mlx5 and efa provider modules, rather than in the generic
pyverbs.ru module.
libcxiverbs.so.1 is packaged the way efa, mana and mlx5 are: in
ibverbs-providers on Debian, with a symbols section, a lintian override
and a copyright entry; in its own libcxiverbs1 package on SUSE,
required by libibverbs and devel; and in libibverbs on Red Hat.
cxi_launcher ships with the provider library rather than in the -utils
package: client programs cannot run on CXI hardware without it, so it
has to be installed whenever the provider is, and putting it in -utils
would make that package mandatory on every CXI system. The RPM file
list previously named a uet_launcher plugin and binary that no longer
exist.
checkpatch reports one REPEATED_WORD warning in
pyverbs/providers/cxi/cxidv.pyx ("Context context"). This is a false
positive: it is a Cython typed parameter (type Context, name context),
not a repeated word.
Co-developed-by: Iraimani P <iraimani.pavadai@hpe.com>
Signed-off-by: Iraimani P <iraimani.pavadai@hpe.com>
Co-developed-by: Terrence Mitchem <terrence.mitchem@hpe.com>
Signed-off-by: Terrence Mitchem <terrence.mitchem@hpe.com>
Signed-off-by: Doug Ledford <doug.ledford@hpe.com>
Teach ibv_ru_pingpong and ibv_ru_rma to run on a Slingshot device. CXI has no implicit resources and the service and job grant that authorise them can only be created by root. On a Slingshot transport a program that finds no grant (UET_JOB_FD unset) runs itself again under cxi_launcher, which creates the grant and then runs the program as the sudo user. The second run finds the grant, allocates its LNI, PD and PID from it, imports the job and runs the test. A user starts it with "sudo ibv_ru_pingpong -d DEV ..." and, as with ibv_ru_rma, may choose the JobID (the VNI) with -j. The launcher is found next to the program or in the install bindir, never through PATH. Other transports use the existing code path. The programs no longer create a service of their own. The SGE count is checked against the device maximum instead of a fixed constant, and devinfo reports the Slingshot transport and GID type names. The Slingshot path uses the cxidv API. It, and the link against libcxiverbs, is built only when the CXI provider is, which requires HAVE_COHERENT_DMA; elsewhere the examples build without it. UET ABI decision needed: this keeps the RU examples, and the generic pyverbs.ru module, available on platforms without coherent DMA. If UET, and by extension the RU queue pair type, is not expected to support such platforms, the RU examples and pyverbs.ru should instead be built only when HAVE_COHERENT_DMA is set, as the mlx5 and efa pyverbs modules are. 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #1829 (libibverbs: Ultra Ethernet reliable unconnected verbs). This branch is based on the head of #1829 (8db37d9), so until that merges this pull request also shows its commits; only the last 12 commits are new here.
The same series was posted to linux-rdma: https://patch.msgid.link/20261031-cxi-for-next-v1-0-93ce01907ce2@hpe.com
This pull request adds cxiverbs, the user space provider for the HPE
Slingshot Cassini NIC, matching the cxiverbs kernel driver. It uses the
UET reliable unconnected (RU) queue pair type from the UET rdma-core
series.
Patches 1-3 extend libibverbs:
timestamps, using the kernel counters extension
change. This relaxes a rule in the UET series and needs agreement
from its authors; the commit message gives the hardware reasons.
The new provider ops join the private ABI that the UET series already
raised to 66; since 66.0 is unreleased, IBVERBS_PABI_VERSION is not
bumped again.
Patches 4-11 add the provider:
LNIs, communication profiles, event and command queues, counting
triggers, CSR access), with explicit ownership
traffic
grant a job exact VNIs, a traffic class and resource limits before
it starts the application without privileges
library packaged like efa, mana and mlx5 and built only where
coherent DMA is available, and the pyverbs cxidv bindings used by
the RU tests. cxi_launcher ships with the provider library, since
client programs cannot run on CXI hardware without it.
Patch 12 ports the ibv_ru_pingpong and ibv_ru_rma examples to the
explicitly granted resources. On a Slingshot device they run
themselves again under cxi_launcher, so when the CXI provider is built
they use the cxidv API and link against libcxiverbs; that is why they
come after the provider.
Dependencies
This pull request depends on:
net: hpe: add HPE Slingshot NIC drivers
https://lore.kernel.org/netdev/20261030-cxi-netdev-submission-v1-0-8c2c391cc283@hpe.com/
RDMA/core: Ultra Ethernet transport verbs
https://lore.kernel.org/linux-rdma/20261019-uet-ib-core-v2-0-8bd654f25370@broadcom.com/
RDMA/cxi: add the HPE Cassini verbs driver
https://lore.kernel.org/linux-rdma/20261030-cxi-for-next-v1-0-bc6e49e07037@hpe.com/
libibverbs: Ultra Ethernet reliable unconnected verbs
libibverbs: Ultra Ethernet reliable unconnected verbs #1829
kernel-headers/ carries the UAPI headers from those kernel series.
Known open issues
No known functional issues are open in the provider. Where the
kernel's SR-IOV support is involved, the kernel series notes that V2
will include an updated SR-IOV implementation.
One question needs a UET ABI decision: the RU examples and the generic
pyverbs.ru module are still built on platforms without coherent DMA,
where the CXI provider is not. If UET, and so the RU queue pair type,
is not expected to support those platforms, they should instead be
built only where coherent DMA is available (see patch 12).
checkpatch
With rdma-core's CI checkpatch settings (buildlib/azp-checkpatch),
three patches still report warnings; each patch explains its own:
shared headers use attribute((packed)) because the kernel-only
__packed is not available to user space, and the command queue
status and event fields stay volatile because the device writes
them.
signal state.
pyverbs/providers/cxi/cxidv.pyx ("Context context" is a Cython typed
parameter).
These exceptions are documented in providers/cxi/utils/README.md. If
reviewers prefer a different form, it needs coordination with the
internal HPE repositories these headers are synchronized from, and will
be changed in V2.
Review and testing
Before posting, the provider was reviewed with the Sashiko AI code
review tool and checkpatch.
Tool use: GitHub Copilot, an AI coding assistant, was used under our
direction to write many of the review fixes, to fold them into these
patches, to write commit messages and to run the build and hardware
tests. Every change was reviewed by the submitter, who takes
responsibility for it as for any other patch.
compiler warnings, and the series also builds without warnings with
coherent DMA disabled, where the CXI provider is left out
Cassini 2 x86_64 nodes, the full stack passed a full test matrix on
both nodes: the rdma-core Python suite (434 tests; tests that need
features this device lacks are skipped), the provider's model
tests, launcher file descriptor tests, resource and VNI isolation
tests in default and indexed addressing modes, including wrong-VNI
rejection, privileged and unprivileged CSR access tests, and 36
two-node RU ping-pong and RMA traffic cases (polling and event
modes) in each direction, 72 in total.
Co-developed by Iraimani P and Mamila Santosh, as shown by the trailers
on each patch.
Doug Ledford (12):
libibverbs: add ibv_read_counters_ex()
libibverbs: permit jobs without an address table
libibverbs: support provider completion channels and Slingshot transport
cxiverbs: add the synchronized native hardware and verbs headers
cxiverbs: define the native direct-verbs resource interface
cxiverbs: encode list entries and VNI-isolated remote keys
cxiverbs: add the provider and device discovery
cxiverbs: implement UET verbs with explicit native ownership
cxiverbs: cover identity isolation and polling and event traffic
cxiverbs: launch Slurm-style exact VNI TC and resource grants
cxiverbs: wire and package the CXI verbs provider and tests
libibverbs: port RU examples to explicitly granted resources
71 files changed, 32565 insertions(+), 182 deletions(-)