Install
openclaw skills install verbs-to-urma-converterMigrate RDMA verbs code to URMA API. Use this skill when user wants to convert infiniband verbs code to URMA, or during RDMA/InfiniBand migration, or when user mentions verbs APIs, ibv_*, rdma, or wants to use URMA instead of traditional RDMA. This skill handles complete migration including API mapping, data structure conversion, and URMA-specific optimizations.
openclaw skills install verbs-to-urma-converterVersion: 1.0 | URMA API Version: 25.12.0
This skill migrates RDMA Verbs (libibverbs) code to URMA (Unified Remote Memory Access) API.
Trigger this skill in the following situations:
The following constraints apply throughout the entire migration; no phase may violate them:
urma_output/, preserving original directory structure; original files must not be modifiedurma_api.h / urma_types.h as authority; when conflicts with reference documents, use header files{0} or {.field = value} for initialization; uninitialized fields cause undefined behavior| RDMA Verbs Concept | URMA Equivalent |
|---|---|
| PD (Protection Domain) | Implicit in URMA |
| MR (Memory Region) | urma_target_seg_t via urma_register_seg() |
| CQ (Completion Queue) | urma_jfc_t via urma_create_jfc() |
| QP (Queue Pair) | urma_jetty_t or urma_jfs_t + urma_jfr_t |
| SRQ (Shared Receive Queue) | urma_jfr_t with share_jfr=1 flag |
| Completion Channel | urma_jfce_t via urma_create_jfce() |
| LID + GID | urma_eid_t (16-byte endpoint ID; LID removed) |
| QPN | JPN (Jetty Pair Number) |
| PSN | PSN (Packet Sequence Number) |
mapping.md §1)| Verbs | URMA |
|---|---|
ibv_open_device() | urma_create_context() |
ibv_reg_mr() | urma_register_seg() |
ibv_create_cq() | urma_create_jfc() |
ibv_create_qp() | urma_create_jetty() |
ibv_modify_qp(RTR/RTS) | urma_import_jetty() + urma_bind_jetty() |
ibv_post_send() | urma_post_jetty_send_wr() |
Goal: Understand source code and establish complete API mapping.
Mandatory deliverables (must be produced at phase end):
Must complete (hard constraints during phase):
/usr/include/ub/umdk/urma/Reference consultation path (recommended, not mandatory):
Goal: Create converted code in urma_output/ directory; original files remain unchanged.
Mandatory deliverables (must be produced at phase end):
urma_output/ directory containing all converted files, preserving original directory structureConversion constraints (must be satisfied):
urma_output/; original files must not be modifiedEach file's conversion content:
#include <infiniband/verbs.h> → #include <ub/umdk/urma/urma_api.h>wc.qp_num → cr.local_id)IBV_MTU_1024 → URMA_MTU_1024)lid:qpn:psn:gid → jpn:eid; consult mapping.md §Address Exchange Format Decision)Build config must be updated:
-libverbs → -lurma -lurma_commoninfiniband/verbs.h → ub/umdk/urma/urma_api.h-lurma -lurma_common)Problem: After Phase 1 produces mapping plan, Phase 2 file-by-file conversion easily omits non-core path mapping items (e.g.,
ibv_create_comp_channel → urma_create_jfce), because verification only compares patterns/pitfalls (general knowledge), not Phase 1 mapping plan (project-specific checklist).
Two-layer traceability mechanism:
File-level traceability (verify immediately after each file is converted):
Project-level traceability (aggregate verification after all files are converted):
Must verify:
Must achieve state:
Output method: List verification results and judgment basis for each chapter item by item, ensuring auditable. Cannot substitute item-by-item checks with general statements like "verified".
Goal: Compile, link, and verify converted code.
Mandatory deliverables (must be produced at phase end):
liburma.so and liburma_common.so)Must complete (hard constraints during phase):
Common compilation errors and troubleshooting directions:
| Error Type | Possible Cause | Troubleshooting Direction |
|---|---|---|
| Undefined reference | Wrong API name | Check correct function signature in urma_api.h |
| No member named 'jetty_id' | Wrong field name | cr.local_id, not cr.jetty_id (see mapping.md) |
| Macro redefinition | Macro already exists in header | Delete self-defined macros |
| Type mismatch | Wrong parameter type | Match exact signature in urma_api.h |
| Missing header file | Correct header not included | Add #include <ub/umdk/urma/urma_api.h> |
Goal: Check cross-file semantic issues from project perspective; verify correctness beyond compilation.
Why cannot look at single file only: Resource lifecycle spans files (created in A, destroyed in B), type declarations modified in .h but .c references not synced, Verbs residue may only appear in "copied as-is" utility files — these are issues that single-file perspective cannot discover.
Mandatory deliverables (must be produced at phase end):
ibv_* / verbs.h / infiniband references in urma_output/Must complete (hard constraints during phase):
ibv_cq *g_cq → urma_jfc_t *g_jfc), confirm .h declarations and all .c uses are consistenturma_output/urma_import_* have corresponding urma_unimport_*; does each urma_wait_jfc have urma_ack_jfcFix and recompile until clean.
Present to user:
Mandatory: All converted code goes to new directory. Original files remain unchanged.
Final output structure:
project/
├── (original files - unchanged)
└── urma_output/
├── (converted .c files)
├── (converted .h files)
├── (copied non-Verbs files as-is)
└── Makefile
After successful migration, you may discover new mappings, patterns, or pitfalls.
Steps:
Collect new discoveries:
Present discoveries to user:
I discovered the following new information during migration:
[List discoveries clearly]
Should I add these to the reference files?
If user agrees:
references/mapping.mdreferences/patterns.mdreferences/pitfalls.mdIf user refuses:
This ensures the skill improves with actual usage, but only with user consent.
| File | Purpose | Agent Usage Scenario |
|---|---|---|
mapping.md | Verbs → URMA lookup table | "What is X's URMA equivalent?" |
patterns.md | Complete code patterns | "Show me how to write X" |
pitfalls.md | Known issues and fixes | "Why did X fail?" |
urma_sample.md | Complete working example (~1280 lines) | Read on demand only when patterns.md is not detailed enough |
Recommended reading order:
mapping.md - Learn API equivalentspatterns.md - View complete working codepitfalls.md - Avoid common errorsurma_sample.md - Read only when complete reference implementation needed (~1280 lines, load on demand)