RDMA-RESOURCE(8)
๐ RDMA-RESOURCE โ rdma resource configuration ๐
okay bestie, sit DOWN, because we're about to talk about rdma-resource โ that's the RDMA-RESOURCE(8) page from the Linux manual, and it's genuinely one of those little tools that has main character energy once you know what it does. no cap. ๐ฆ
โจ NAME โจ
rdma-resource โ rdma resource configuration ๐
๐ธ SYNOPSIS ๐ธ
rdma [ OPTIONS ] RESOURCE { COMMAND | help }
RESOURCE := { cm_id | cq | mr | pd | qp | ctx | srq | frmr_pools }
OPTIONS := { -j[son] | -d[etails] }
rdma resource show [ DEV/PORT_INDEX ]
rdma resource set frmr_pools dev DEV aging AGING_PERIOD
rdma resource set frmr_pools dev DEV pinned POOL_KEY PINNED_VALUE
rdma resource help
like, that's the whole shape of it. RESOURCE is the thing you're poking at, COMMAND is what you're doing to it, and help is always there being a supportive bestie. ๐ซถ
๐ DESCRIPTION ๐
โญ rdma resource show โ display rdma resource tracking information
literally just shows you what's going on with the resources. the tea. โ
DEV/PORT_INDEXโ this one says which RDMA link you wanna see. and if you just... don't give it? all links get listed. every single one. the whole squad. ๐
โญ rdma resource set โ configure resource related parameters
this is the "actually change something" side of the house. ๐ฅ
DEVโ the RDMA device you wanna configure. that's the one. ๐AGING_PERIODโ the aging period, in seconds, for FRMR handles that nobody's using. handles that sit unused for this long get freed. it's giving "use it or lose it" fr fr. ๐POOL_KEYโ the key that IDs a specific FRMR pool. it's a colon-separated list of hexadecimal fields, formatted exactly like this:
vendor_key:num_dma_blocks:access_flags:ats
PINNED_VALUEโ the pinned value for that FRMR pool. a non-zero value pins handles to the pool, which stops them from getting freed by the aging mechanism. so like... the aging thing can't touch them anymore. protected. iconic. โจ
๐ EXAMPLES ๐
okay this is the fun part, let's go, demo time bestie ๐
rdma resource showshows the summary for all devices on the system.rdma resource show mlx5_2shows the state of the specified rdma device.rdma res show qp link mlx5_4get all QPs for that specific device.rdma res show qp link mlx5_4/1get QPs of a specific port.rdma res show qp link mlx5_4/0gives you an illegal port number โ because0is illegal. not me picking a fight with the kernel ๐rdma res show qp link mlx5_4/-get QPs that haven't been assigned a port yet. the little guys still figuring themselves out ๐ฆrdma res show qp link mlx5_4/- -ddetailed view.rdma res show qp link mlx5_4/- -dddetailed view including driver-specific details.rdma res show qp link mlx5_4/1 lqpn 0-6limit it to specific Local QPNs.rdma res show qp link mlx5_4/1 lqpn 6 -rdriver specific details, in raw format.rdma resource show cm_id dst-port 7174show CM_IDs with a destination ip port of7174.rdma resource show cm_id src-addr 172.16.0.100show CM_IDs bound to local ip address172.16.0.100.rdma resource show cq pid 30489show CQs belonging to pid30489.rdma resource show ctx ctxn 1show contexts that have an index equal to1.rdma resource show srq lqpn 5-7show SRQs that the QPs with lqpn5-7are associated with.rdma resource show frmr_pools ats 1show FRMR pools that have theatsattribute set.rdma resource set frmr_pools dev rocep8s0f0 aging 120set the aging period for FRMR pools on devicerocep8s0f0to120seconds.rdma resource set frmr_pools dev rocep8s0f0 pinned 0:1000:0:0 25000pin25000handles to the FRMR pool identified by key0:1000:0:0on devicerocep8s0f0, so they don't get freed. locked in. ๐
๐ฆ SEE ALSO ๐ฆ
rdma(8), rdma-dev(8), rdma-link(8), rdma-statistic(8),
like, go read those too, they're the friend group. ๐ซถ
๐ AUTHOR ๐
Leon Romanovsky <leonro@mellanox.com> โ thank you for your service, king ๐
okay that's the page bestie!! this whole thing came out of iproute2, dated 26 Dec 2017, and honestly? it ate. no crumbs. go configure some resources, you've got this. periodt. ๐
โจ๐๐ฆ๐๐
๐ฆ where this page comes from
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- nixpkgs unstable: iproute2 7.2.0
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms