Crates.io | rdma |
lib.rs | rdma |
version | 0.3.0 |
source | src |
created_at | 2022-05-29 10:06:13.796274 |
updated_at | 2022-06-01 08:54:28.197066 |
description | Low-level RDMA API |
homepage | |
repository | https://github.com/Nugine/rdma |
max_upload_size | |
id | 596433 |
size | 223,259 |
Low-level RDMA API.
This crate requires the latest rdma-core installation.
Please make sure the following commands work:
$ pkg-config --modversion libibverbs
1.14.41.0
$ pkg-config --modversion librdmacm
1.3.41.0
The output also shows the minimum required versions.
Add a Soft-RoCE device:
sudo rdma link add rxe0 type rxe netdev ens33
rxe0
is the RDMA device name. You can name it whatever you want. ens33
is the name of a network device. The name of the network device may be different. You can see it by running command ifconfig
.
There is a tutorial for Chinese users: https://zhuanlan.zhihu.com/p/361740115.
Please install the tool just if you don't have it.
Install the examples:
just install-examples
Run the example rdma-devices
:
$ rdma-devices
| name | guid |
| ---- | ---------------- |
| rxe0 | 26418cfffe021df9 |
Run the example rdma-pingpong
:
RC service
rdma-pingpong rc
rdma-pingpong rc 127.0.0.1
UD service
rdma-pingpong ud
rdma-pingpong ud 127.0.0.1
Run the benchmarks:
just bench-pingpong-rc
just bench-pingpong-ud
Run the example rdma-async
:
rdma-async-rpc
All the APIs related with raw memory are unsafe.
We are exploring how to provide a safe and easy way to manage memory in RDMA.
The example rdma-async may give you inspiration.
The RDMA resources are managed by reference counting.
The graph below shows the relations between resources.