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. ๐Ÿ’–

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 show shows the summary for all devices on the system.
  • rdma resource show mlx5_2 shows the state of the specified rdma device.
  • rdma res show qp link mlx5_4 get all QPs for that specific device.
  • rdma res show qp link mlx5_4/1 get QPs of a specific port.
  • rdma res show qp link mlx5_4/0 gives you an illegal port number โ€” because 0 is 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/- -d detailed view.
  • rdma res show qp link mlx5_4/- -dd detailed view including driver-specific details.
  • rdma res show qp link mlx5_4/1 lqpn 0-6 limit it to specific Local QPNs.
  • rdma res show qp link mlx5_4/1 lqpn 6 -r driver specific details, in raw format.
  • rdma resource show cm_id dst-port 7174 show CM_IDs with a destination ip port of 7174.
  • rdma resource show cm_id src-addr 172.16.0.100 show CM_IDs bound to local ip address 172.16.0.100.
  • rdma resource show cq pid 30489 show CQs belonging to pid 30489.
  • rdma resource show ctx ctxn 1 show contexts that have an index equal to 1.
  • rdma resource show srq lqpn 5-7 show SRQs that the QPs with lqpn 5-7 are associated with.
  • rdma resource show frmr_pools ats 1 show FRMR pools that have the ats attribute set.
  • rdma resource set frmr_pools dev rocep8s0f0 aging 120 set the aging period for FRMR pools on device rocep8s0f0 to 120 seconds.
  • rdma resource set frmr_pools dev rocep8s0f0 pinned 0:1000:0:0 25000 pin 25000 handles to the FRMR pool identified by key 0:1000:0:0 on device rocep8s0f0, 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