rdma

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package rdma provides Go bindings to libcuobjserver. This file is a stub for platforms without RDMA support.

Index

Constants

View Source
const MaxTransferSize = 1 << 30

MaxTransferSize is the cuObjServer limit per RDMA operation (1 GiB).

Variables

This section is empty.

Functions

func ConfigureTelemetry

func ConfigureTelemetry(debug bool)

ConfigureTelemetry is a no-op on platforms without RDMA support.

func DebugTelemetryEnabled

func DebugTelemetryEnabled() bool

DebugTelemetryEnabled always reports false on stub platforms.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

Buffer wraps an RDMA-registered memory region (stub — always zero-valued).

func (*Buffer) HostPtr

func (b *Buffer) HostPtr() unsafe.Pointer

HostPtr returns the underlying host memory pointer.

func (*Buffer) Size

func (b *Buffer) Size() int

Size returns the buffer size in bytes.

func (*Buffer) Slice

func (b *Buffer) Slice() []byte

Slice returns the buffer contents as a Go byte slice.

type RDMATunables

type RDMATunables struct {
	// NumDCIs controls the maximum number of concurrent RDMA connections
	// (Dynamic Connection Interfaces). Default: 128.
	NumDCIs int
	// CQDepth is the completion queue depth, limiting outstanding ops.
	// Default: 640.
	CQDepth uint32
	// DCKey is the InfiniBand Dynamic Connection security key. All clients
	// must use a matching key. Change this from the default in production.
	// Default: 0xffeeddcc.
	DCKey uint64
	// ServiceLevel sets the IB QoS service level. Default: 0.
	ServiceLevel int
	// Timeout is the QP ACK timeout exponent: 4.096 * 2^Timeout µs.
	// Default: 16 (~268 ms).
	Timeout uint8
	// HopLimit is the IB packet hop limit (analogous to IP TTL). Default: 4.
	HopLimit uint32
	// PKeyIndex is the IB partition key index. Default: 0.
	PKeyIndex int
	// DelayInterval is the polling delay in nanoseconds. Default: 5000.
	DelayInterval uint32
	// DelayMode selects the polling strategy:
	//   0 = none, 1 = batch (default), 2 = per-entry, 3 = adaptive.
	DelayMode int
	// RetryCount is the QP retry count (0–7). Default: 7.
	RetryCount uint8
	// QPResetOnFailure controls whether the QP is reset after an RDMA failure.
	// Default: true.
	QPResetOnFailure bool
	// TrafficClass sets the IB traffic class / DSCP bits. Default: 96.
	TrafficClass uint32
	// MaxRdAtomic is the max outstanding RDMA reads per DCI QP.
	// 0 means auto-detect from device capabilities. Default: 0.
	MaxRdAtomic int
}

RDMATunables holds RDMA connection tuning parameters that map to cuObjRDMATunableParam. Pass a non-nil pointer in CuServerOpts to apply custom settings before the RDMA session starts; nil means library defaults.

Use DefaultRDMATunables() to start from the library defaults and adjust only the fields you care about.

func DefaultRDMATunables

func DefaultRDMATunables() RDMATunables

DefaultRDMATunables returns a RDMATunables pre-populated with the cuObjServer library defaults. Use this as a starting point and override only the fields you need.

type Server

type Server struct{}

Server wraps a cuObjServer instance (stub — always returns errNotSupported).

func NewServer

func NewServer(ip string, port uint16, tunables *RDMATunables) (*Server, error)

NewServer always returns errNotSupported on this platform.

func (*Server) AllocHostBuffer

func (s *Server) AllocHostBuffer(size int) (unsafe.Pointer, error)

AllocHostBuffer always returns errNotSupported on this platform.

func (*Server) AllocateChannel

func (s *Server) AllocateChannel() (uint16, error)

AllocateChannel always returns errNotSupported on this platform.

func (*Server) Close

func (s *Server) Close()

Close is a no-op on this platform.

func (*Server) CloseSession

func (s *Server) CloseSession()

CloseSession is a no-op on this platform.

func (*Server) DeregisterBuffer

func (s *Server) DeregisterBuffer(buf *Buffer)

DeregisterBuffer is a no-op on this platform.

func (*Server) FreeChannel

func (s *Server) FreeChannel(id uint16)

FreeChannel is a no-op on this platform.

func (*Server) FreeHostBuffer

func (s *Server) FreeHostBuffer(ptr unsafe.Pointer)

FreeHostBuffer is a no-op on this platform.

func (*Server) HandleGet

func (s *Server) HandleGet(key string, buf *Buffer, remoteStart uint64, size int64, rdmaDescr string, channel uint16) (int64, error)

HandleGet always returns errNotSupported on this platform.

func (*Server) HandlePut

func (s *Server) HandlePut(key string, buf *Buffer, remoteStart uint64, size int64, rdmaDescr string, channel uint16) (int64, error)

HandlePut always returns errNotSupported on this platform.

func (*Server) IsConnected

func (s *Server) IsConnected() bool

IsConnected always returns false on this platform.

func (*Server) RegisterBuffer

func (s *Server) RegisterBuffer(ptr unsafe.Pointer, size int) (*Buffer, error)

RegisterBuffer always returns errNotSupported on this platform.

func (*Server) StartSession

func (s *Server) StartSession() error

StartSession always returns errNotSupported on this platform.

Directories

Path Synopsis
Package bufferpool provides a pool of pre-registered RDMA buffers to avoid per-request allocation and registration overhead.
Package bufferpool provides a pool of pre-registered RDMA buffers to avoid per-request allocation and registration overhead.
Package hostclient is stubbed on platforms without RDMA verbs support.
Package hostclient is stubbed on platforms without RDMA verbs support.
Package rcroutes serves the /.hipobj-rc control routes of the hipobj-rc-v2 two-phase transfer protocol.
Package rcroutes serves the /.hipobj-rc control routes of the hipobj-rc-v2 two-phase transfer protocol.
Package rcserver binds the RC session server implementing the hipobj-rc-v2 two-phase transfer protocol.
Package rcserver binds the RC session server implementing the hipobj-rc-v2 two-phase transfer protocol.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL