Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

/sys/class/rtrs-client

FieldValue
SubsystemRTRS-client (RDMA Transport, client side; transport used by RNBD); implementation file not in cached tree
Config gatenot verifiable from cached tree (no drivers/Kconfig cached)
ABI documentationDocumentation/ABI/testing/sysfs-class-rtrs-client (17 What: entries)
Since5.7 (Feb 2020, all entries)
Live (5.10.134 host)class absent: /sys/class/rtrs-client does not exist in this container
Ledger IDSYSC-rtrs-client

What it represents

Sessions of the RTRS RDMA transport as seen by the client. “When a user of RTRS API creates a new session, a directory entry with the name of that session is created under /sys/class/rtrs-client/<session-name>/” (ABI). Each session carries path management (add_path, remove_path, reconnect, disconnect), the multipath policy, reconnect limits, and per-path state, HCA identity, addresses, heartbeat latency, and RDMA statistics. RNBD (rnbd-client) is the documented consumer of these sessions.

Relationship to the device model

Paths are exposed as directories named src@dst under paths/ and are created when add_path is written; hca_name and hca_port tie each path to the RDMA Host Channel Adapter and port carrying it (the live host’s RDMA classes are covered in infiniband). Nothing else about kernel object wiring is stated in the cached ABI.

Attributes

AttributeR/WUnit/formatConditional?Source
<session>/add_pathWO<[src,]dst> with addr ::= [ ip:<ipv4|ipv6> | gid:<gid> ]; adds a path to the sessionper sessionABI testing sysfs-class-rtrs-client, 5.7
<session>/max_reconnect_attemptsRWmax reconnect attempts before giving up after unexpected breakper sessionABI, 5.7
<session>/mp_policyRWpath selection per IO: round-robin (0), min-inflight (1), min-latency (2)per sessionABI, 5.7
<session>/paths/ROone src@dst directory per added pathper pathABI, 5.7
paths/src@dst/stateRO“connected” if fully functional, otherwise “disconnected”per pathABI, 5.7
paths/src@dst/reconnectWOwrite “1”; blocking, returns 0 on successper pathABI, 5.7
paths/src@dst/disconnectWOwrite “1”; blocks until disconnectedper pathABI, 5.7
paths/src@dst/remove_pathWOwrite “1”; disconnects and removes the path from the sessionper pathABI, 5.7
paths/src@dst/hca_nameROname of the HCA the connection usesper pathABI, 5.7
paths/src@dst/hca_portROport number of the active portper pathABI, 5.7
paths/src@dst/src_addr, dst_addrROsource / destination address of the pathper pathABI, 5.7
paths/src@dst/cur_latencyROheartbeat round-trip latency, changes regularlyper pathABI, 5.7
paths/src@dst/stats/reset_allRWread returns usage help; write 0 clears all statisticsper pathABI, 5.7
paths/src@dst/stats/cpu_migrationROIRQs handled on an unexpected CPU, with from:/to: CPUsper pathABI, 5.7
paths/src@dst/stats/reconnectsROtwo counters: successful and failed reconnects in path lifetimeper pathABI, 5.7
paths/src@dst/stats/rdmaROsix values: read-count read-total-size write-count write-total-size inflights failoveredper pathABI, 5.7

Safety and writes

Reads are safe. Writes rewire live RDMA sessions: add_path/disconnect/ remove_path/reconnect change connectivity; RTRS pins each HCA IRQ to a CPU by design, so cpu_migration also exposes interrupt-affinity regressions. The class is absent on the 5.10.134 host; nothing was read live.

References

  • Documentation/ABI/testing/sysfs-class-rtrs-client (cached copy)
  • https://github.com/torvalds/linux/blob/master/Documentation/ABI/testing/sysfs-class-rtrs-client
  • sysfs-attrs.json entry rtrs-client (17 paths); live enumeration: class absent, kernel 5.10.134
  • Related pages: rtrs-server, rnbd-client, infiniband; coverage: ledger