Skip to content

feat(proto): add TransportType (TCP/RDMA) to spdkrpc + imrpc - #121

Draft
abonillabeeche wants to merge 2 commits into
longhorn:mainfrom
abonillabeeche:rdma-transport
Draft

feat(proto): add TransportType (TCP/RDMA) to spdkrpc + imrpc#121
abonillabeeche wants to merge 2 commits into
longhorn:mainfrom
abonillabeeche:rdma-transport

Conversation

@abonillabeeche

@abonillabeeche abonillabeeche commented Aug 20, 2026

Copy link
Copy Markdown

Part of longhorn/longhorn#13796 (RDMA NVMe-oF transport for the v2 data engine).

Adds a TransportType enum (TRANSPORT_TYPE_TCP = 0, TRANSPORT_TYPE_RDMA = 1) to the imrpc and spdkrpc protobufs and threads a transport_type field onto the instance/engine/replica create messages, plus the regenerated Go and Python bindings. TRANSPORT_TYPE_TCP = 0 is the zero value, so absent/old peers deserialize to TCP and behavior is unchanged.

The enum was originally proposed as DataEngineTransport; renamed to TransportType per review on longhorn/longhorn-spdk-engine#654. Field numbers and enum values are unchanged, so the rename is wire-compatible — deployed peers keep interoperating and only source recompiles.

This is the base of a 5-repo change; nothing consumes the new field yet.

Files: protobuf/imrpc/{common,instance}.proto, protobuf/spdkrpc/spdk.proto (+ regenerated pkg/generated/**, generated-py/**).

Add a DataEngineTransport enum (TCP=0 default, RDMA=1) and thread a
data_engine_transport field through:
- spdkrpc.EngineCreateRequest (field 15) and ReplicaCreateRequest (field 7)
- imrpc.SpdkInstanceSpec (field 17)

Mirrors the DataLayoutType precedent. Unset==TCP preserves behavior for
all existing volumes.

Ref: longhorn/longhorn#13796
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
@abonillabeeche abonillabeeche changed the title proto: add DataEngineTransport (TCP/RDMA) to spdkrpc + imrpc feat(proto): add DataEngineTransport (TCP/RDMA) to spdkrpc + imrpc Aug 20, 2026
Address review on longhorn/longhorn-spdk-engine#654: this proto lives in a
v2-data-engine-only surface, and this repo's convention is TransportType,
so drop the DataEngine prefix on the generated type.

  - imrpc/spdkrpc: enum DataEngineTransport -> TransportType,
    values DATA_ENGINE_TRANSPORT_{TCP,RDMA} -> TRANSPORT_TYPE_{TCP,RDMA},
    field data_engine_transport -> transport_type.

Wire-compatible: field numbers and enum values are unchanged, so already
deployed peers keep interoperating; only source that references the Go/py
identifiers must be recompiled.

Ref: longhorn/longhorn#13796
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
abonillabeeche added a commit to abonillabeeche/longhorn-spdk-engine that referenced this pull request Aug 22, 2026
Rename the struct field to TransportType on Engine and Replica and the
client-method params to transportType, and consume the renamed
spdkrpc.TransportType enum. No behavior change.

Ref: longhorn/longhorn#13796
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
abonillabeeche added a commit to abonillabeeche/longhorn-instance-manager that referenced this pull request Aug 22, 2026
Consume the renamed imrpc/spdkrpc TransportType enum and rename the
IM-side field/params and the IM->SPDK conversion helper accordingly.
No behavior change.

Ref: longhorn/longhorn#13796
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
abonillabeeche added a commit to abonillabeeche/longhorn-manager that referenced this pull request Aug 22, 2026
The v2 proto enum was renamed DataEngineTransport -> TransportType in
longhorn/types#121. Adapt at the instance-manager client boundary: the
generated imrpc type is now imrpc.TransportType and the IM client request
field is TransportType. longhorn-manager keeps its own DataEngineTransport
type and VolumeSpec field name (this repo's convention), converting to the
renamed enum in toIMRPCDataEngineTransport and setting the renamed IM
client field. No behavior change.

Ref: longhorn/longhorn#13796
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Alejandro Bonilla <abonilla@suse.com>
@abonillabeeche abonillabeeche changed the title feat(proto): add DataEngineTransport (TCP/RDMA) to spdkrpc + imrpc feat(proto): add TransportType (TCP/RDMA) to spdkrpc + imrpc Aug 22, 2026
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