Skip to content

Add transport connection ID accessors#88

Merged
cliffburdick merged 1 commit into
mainfrom
cburdick/transport-connection-header
May 19, 2026
Merged

Add transport connection ID accessors#88
cliffburdick merged 1 commit into
mainfrom
cburdick/transport-connection-header

Conversation

@cliffburdick
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
@cliffburdick cliffburdick changed the title #0 - Add transport connection ID accessors Add transport connection ID accessors May 19, 2026
@cliffburdick cliffburdick merged commit fcdbaf9 into main May 19, 2026
2 checks passed
@cliffburdick cliffburdick deleted the cburdick/transport-connection-header branch May 19, 2026 20:44
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR introduces get_connection_id and set_connection_id as public free-function accessors for the transport connection ID carried by a BurstParams burst, replacing all direct rdma_hdr.conn_id field accesses across the RDMA and socket backends, the socket benchmark example, and the Python bindings.

  • AdvNetRdmaBurstHdr is renamed to BurstTransportHeader and its union member in BurstParams renamed from rdma_hdr to transport_hdr — a source-breaking change that correctly generalizes the abstraction away from RDMA-only naming.
  • Both backends (daqiri_rdma_mgr.cpp, daqiri_socket_mgr.cpp) and the socket benchmark are migrated to the new accessors; docs/api-guide.md and docs/daqiri-api.html are updated accordingly.
  • The Python rdma_wr_id property is left half-migrated: it retains an RDMA-specific name and still accesses transport_hdr.wr_id directly, inconsistent with the generic connection_id property added in the same binding class.

Confidence Score: 3/5

The mechanical rename and new accessors are correct, but missing AGENTS.md updates and a suspicious issue number in the commit title need to be resolved before merging.

The core implementation is mechanically sound. Missing doc updates leave AGENTS.md out of sync with the new public API surface and the struct rename, and the commit references #0 instead of a real approved issue.

python/daqiri_common_pybind.cpp (naming inconsistency in rdma_wr_id) and the missing AGENTS.md plus tutorial doc updates

Important Files Changed

Filename Overview
include/daqiri/types.h Renames AdvNetRdmaBurstHdr to BurstTransportHeader and rdma_hdr union member to transport_hdr in BurstParams — a source-breaking rename of a public struct field that correctly generalizes the transport abstraction.
include/daqiri/common.h Adds get_connection_id(const BurstParams*) and set_connection_id(BurstParams*, uintptr_t) to the public free-function API; signatures and doc-comments are correct.
src/common.cpp Implements both new accessors with null-pointer asserts consistent with existing helpers; straightforward and correct.
src/managers/rdma/daqiri_rdma_mgr.cpp Migrates all rdma_hdr field accesses to transport_hdr; uses the new get/set_connection_id accessors for conn_id while still accessing other fields directly — mechanical and thorough.
src/managers/socket/daqiri_socket_mgr.cpp Replaces two direct rdma_hdr.conn_id reads/writes with the new accessor calls; clean migration.
python/daqiri_common_pybind.cpp Migrates rdma_conn_id to connection_id using the new accessors, but leaves rdma_wr_id with an RDMA-specific name and direct struct access — inconsistent with the accessor pattern introduced by this PR.
examples/socket_bench.cpp Replaces direct rdma_hdr.conn_id assignment with set_connection_id — correct use of the new API.
docs/api-guide.md Adds a short usage example for set_connection_id/get_connection_id; accurate but AGENTS.md and tutorial docs are not updated in this PR.
docs/daqiri-api.html Adds a sidebar entry and method card for the new connection-ID functions; HTML is well-formed and consistent with existing entries.

Sequence Diagram

sequenceDiagram
    participant App as Application
    participant API as common.h / common.cpp
    participant Burst as BurstParams.transport_hdr
    participant RDMA as RdmaMgr
    participant Sock as SocketMgr

    App->>API: set_connection_id(burst, conn_id)
    API->>Burst: "transport_hdr.conn_id = conn_id"

    App->>API: send_tx_burst(burst)
    API->>RDMA: send_tx_burst(burst)
    RDMA->>API: get_connection_id(burst)
    API->>Burst: return transport_hdr.conn_id
    RDMA->>RDMA: tx_rings_map_.find(conn_id)

    App->>API: send_tx_burst(burst)
    API->>Sock: send_tx_burst(burst)
    Sock->>API: get_connection_id(burst)
    API->>Burst: return transport_hdr.conn_id
    Sock->>Sock: connections_.find(conn_id)

    Sock->>Burst: set_connection_id(burst, conn_id)
    App->>API: get_connection_id(rx_burst)
    API-->>App: conn_id of peer that sent this burst
Loading

Comments Outside Diff (1)

  1. docs/api-guide.md, line 1 (link)

    P1 Doc-sync: AGENTS.md and several other docs not updated

    This PR touches include/daqiri/common.h (new public functions), include/daqiri/types.h (struct rename), src/managers/rdma/, src/managers/socket/, and examples/socket_bench.cpp — all paths that require additional doc updates per .claude/rules/docs-sync.md. docs/api-guide.md and docs/daqiri-api.html were updated, but the following are still missing:

    • AGENTS.md — required by every changed source path (new get_connection_id/set_connection_id API surface, BurstTransportHeader rename)
    • docs/tutorials/benchmarking_examples.md and docs/tutorials/configuration-walkthrough.md — required by examples/socket_bench.cpp
    • docs/getting-started.md, docs/configuration.md, and README.md (Backends section) — required by src/managers/rdma/ and src/managers/socket/

    Rule Used: DAQIRI has no automated doc-sync gate beyond mkdoc... (source)

Reviews (1): Last reviewed commit: "#0 - Add transport connection ID accesso..." | Re-trigger Greptile

Comment thread include/daqiri/common.h
Comment on lines 537 to +554
*/
int64_t get_q_id(BurstParams *burst);

/**
* @brief Get the transport connection ID associated with a burst
*
* @param burst Burst structure with transport metadata
*/
uintptr_t get_connection_id(const BurstParams *burst);

/**
* @brief Set the transport connection ID associated with a burst
*
* @param burst Burst structure with transport metadata
* @param conn_id Connection ID representing a unique client/server connection
*/
void set_connection_id(BurstParams *burst, uintptr_t conn_id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Commit references issue #0

The commit title is #0 - Add transport connection ID accessors. GitHub issue numbers start at #1; #0 does not correspond to a real issue. Per CONTRIBUTING.md, an approved issue must exist before coding starts. Please link to the actual tracking issue and update the commit title accordingly (or amend if needed).

Rule Used: Commit titles must use imperative mood and be pref... (source)

Comment on lines 456 to 461
.def_property(
"rdma_wr_id",
[](const BurstParams &burst) { return burst.rdma_hdr.wr_id; },
[](const BurstParams &burst) { return burst.transport_hdr.wr_id; },
[](BurstParams &burst, uint64_t wr_id) {
burst.rdma_hdr.wr_id = wr_id;
burst.transport_hdr.wr_id = wr_id;
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 rdma_wr_id Python property still uses an RDMA-specific name and bypasses the new accessor pattern

conn_id was correctly genericized to connection_id via the new get_connection_id/set_connection_id accessors, but wr_id still carries the rdma_ prefix in the Python API and directly accesses transport_hdr.wr_id. This leaves the Python binding half-migrated: consumers see connection_id (generic) next to rdma_wr_id (RDMA-specific), and wr_id is the only BurstTransportHeader field still accessed directly from binding code.

Suggested change
.def_property(
"rdma_wr_id",
[](const BurstParams &burst) { return burst.rdma_hdr.wr_id; },
[](const BurstParams &burst) { return burst.transport_hdr.wr_id; },
[](BurstParams &burst, uint64_t wr_id) {
burst.rdma_hdr.wr_id = wr_id;
burst.transport_hdr.wr_id = wr_id;
});
.def_property(
"wr_id",
[](const BurstParams &burst) { return burst.transport_hdr.wr_id; },
[](BurstParams &burst, uint64_t wr_id) {
burst.transport_hdr.wr_id = wr_id;
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant