13 releases
| 0.7.3 | Dec 23, 2024 |
|---|---|
| 0.7.0 | May 16, 2024 |
| 0.6.6 | Jan 23, 2024 |
| 0.6.1 | Dec 22, 2023 |
| 0.5.2 |
|
#699 in Network programming
1,720 downloads per month
Used in rrppcc
260KB
6K
SLoC
rrddmma
A Rust RDMA library.
This library is more for academic use than for industry. It is highly specialized to Mellanox/NVIDIA ConnectX network adapter series.
WARNING: the interfaces are unstable and under continuous change!
Linkage
This library supports multiple linkage types to the ibverbs library.
-
First, this library respects existing MLNX_OFED installations. It works on both v4.9-x and v5.x versions.
- MLNX_OFED v4.9-x will enable experimental, see below.
MLNX*OFED v5.x will enable(TODO)mlx5dv*\*features.
-
Otherwise,
rrddmmawill try to find an existinglibibverbsinstallation viapkg-config.This will enable enable(TODO)mlx5dv_*features.
-
Otherwise,
rrddmmawill try to download rdma-core and build from source. You need to ensure that the dependencies are properly installed. In Ubuntu and other Debian-derived OSs, these are:sudo apt install -y build-essential cmake gcc libclang-dev libudev-dev libsystemd-dev \ libnl-3-dev libnl-route-3-dev ninja-build pkg-config valgrind \ python3-dev cython3 python3-docutils pandocBuilding from source is different from the previous two approaches in that
libibverbsis linked statically and cannot detect providers at runtime. This library currently only allows themlx5provider.This will enable enable(TODO)mlx5dv_*features.
Undocumented Features
Due to the distinct feature set of MLNX_OFED v4.x and v5.x drivers, enabled features of this library is also different on different machines. As a result, some features are undocumented in docs.rs. Here are some of them:>
- Dynamically Connected QPs: available on MLNX_OFED v4.x. A
Dcttype will be available, and you may create QPs of typeQpType::DcInito send messages toDcts. - Extended Atomics: available on MLNX_OFED v4.x.
Qp::ext_compare_swap()andQp::ext_fetch_add()will be available. To use this feature, callenable_feature(ExpFeature::ExtendedAtomics, N)when you build a QP, in whichNcan be 8, 16, or 32.
To get a complete set of features, you can build the documentation locally:
cargo doc --open
Some Design Principles
Panics in Fallible Methods
It is widely recognized as a bad design pattern to panic in fallible methods (i.e., methods that return a Result).
However, in RDMA, this is not the case because there are actually two different types of errors:
- Programming errors: These are logic errors caused by the programmers who do not follow the instructions of the
manual. Examples include forgetting to bind a QP to a local port before making or binding a peer on it.
These errors should be caught during development and testing, should never happen in production, and are never recoverable.
rrddmmapanics for these errors. - Runtime errors: These are errors reported by the
libibverbslibrary, such as failing to create a QP due to resource exhaustion. These errors are recoverable and should be handled by the caller.rrddmmareturnsErrs for these errors.
Dependencies
~3.5–9MB
~165K SLoC