* Copyright (c) 2026 Huawei Technologies Co., Ltd.
* openFuyao is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
package types
type RDMAConnectionInfo struct {
DeviceName string `json:"deviceName,omitempty"`
QPN uint32 `json:"qpn,omitempty"`
PSN uint32 `json:"psn,omitempty"`
LID uint16 `json:"lid,omitempty"`
GID string `json:"gid,omitempty"`
RKey uint32 `json:"rkey,omitempty"`
Addr uint64 `json:"addr,omitempty"`
Length uint64 `json:"length,omitempty"`
}
type RelayRDMAHint struct {
SessionID string `json:"sessionID"`
ConnectionInfo RDMAConnectionInfo `json:"connectionInfo"`
Persistent bool `json:"persistent,omitempty"`
}
type OpenRDMAExportRequest struct {
RootPath string `json:"rootPath"`
RelativePath string `json:"relativePath"`
Offset int64 `json:"offset"`
Length int64 `json:"length"`
}
type OpenRDMAExportResponse struct {
SessionID string `json:"sessionID"`
TransportPath TransportPath `json:"transportPath"`
SourceNode string `json:"sourceNode,omitempty"`
ConnectionInfo RDMAConnectionInfo `json:"connectionInfo"`
ExpectedCRC32C string `json:"expectedCRC32C,omitempty"`
Message string `json:"message,omitempty"`
}
type ConnectRDMAExportRequest struct {
SessionID string `json:"sessionID"`
TargetNode string `json:"targetNode,omitempty"`
ConnectionInfo RDMAConnectionInfo `json:"connectionInfo"`
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
}
type ConnectRDMAExportResponse struct {
SessionID string `json:"sessionID"`
TransportPath TransportPath `json:"transportPath"`
Message string `json:"message,omitempty"`
}
type UpdateRDMAExportRequest struct {
SessionID string `json:"sessionID"`
Offset int64 `json:"offset"`
Length int64 `json:"length"`
}
type UpdateRDMAExportResponse struct {
SessionID string `json:"sessionID"`
TransportPath TransportPath `json:"transportPath"`
ConnectionInfo RDMAConnectionInfo `json:"connectionInfo"`
ExpectedCRC32C string `json:"expectedCRC32C,omitempty"`
Message string `json:"message,omitempty"`
}
type CloseRDMAExportRequest struct {
SessionID string `json:"sessionID"`
}
type CloseRDMAExportResponse struct {
SessionID string `json:"sessionID"`
Closed bool `json:"closed"`
}