cubackend

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CuServer

type CuServer struct {
	backend.Backend
	// contains filtered or unexported fields
}

CuServer is a versitygw Backend that embeds another backend and overrides PutObject/GetObject for RDMA-accelerated transfers via cuObjServer. All other S3 operations (list, head, delete, multipart, etc.) pass through to the embedded backend unchanged.

func New

func New(opts CuServerOpts, be backend.Backend) (*CuServer, error)

New creates a CuServer backend. It creates a cuObjServer instance, starts the RDMA session, and pre-allocates a pool of RDMA-registered host buffers.

func (*CuServer) GetObject

func (cs *CuServer) GetObject(ctx context.Context, input *s3.GetObjectInput) (*s3.GetObjectOutput, error)

GetObject handles S3 GET requests. If the request context contains a cuObject RDMA descriptor, the object is read from the backend into an RDMA buffer, then transferred via RDMA WRITE to the client's GPU memory. The HTTP response contains metadata only (no body). Without an RDMA descriptor, delegates directly to backend.

func (*CuServer) PutObject

PutObject handles S3 PUT requests. If the request context contains a cuObject RDMA descriptor, data is transferred via RDMA READ from the client's GPU memory into a local buffer, then written to the backend Without an RDMA descriptor, delegates directly to backend.

func (*CuServer) Shutdown

func (cs *CuServer) Shutdown()

Shutdown closes the buffer pool and RDMA server, then shuts down the embedded backend.

func (*CuServer) String

func (*CuServer) String() string

String returns a human-readable identifier for the backend.

func (*CuServer) UploadPart

func (cs *CuServer) UploadPart(ctx context.Context, input *s3.UploadPartInput) (*s3.UploadPartOutput, error)

UploadPart handles S3 multipart upload part requests. RDMA offload is not supported here: object data would travel out-of-band via RDMA, but the embedded backend's UploadPart still expects the part in the HTTP body. Decline the descriptor so the client retries over the normal HTTP path instead of silently uploading a wrong/empty part.

type CuServerOpts

type CuServerOpts struct {
	// RDMAIP is the server IP address for the RDMA interface.
	RDMAIP string
	// RDMAPort is the server port for the RDMA interface.
	RDMAPort uint16

	// Pool configuration
	PoolBufSize  int // Size of each RDMA buffer (default: 1 GiB)
	PoolBufCount int // Number of RDMA buffers to pre-allocate (default: 4)

	// RDMATunables configures low-level RDMA connection parameters applied
	// before the session starts. If nil, cuObjServer library defaults are
	// used. Use rdma.DefaultRDMATunables() as a starting point.
	RDMATunables *rdma.RDMATunables
}

CuServerOpts configures the CuServer backend.

Jump to

Keyboard shortcuts

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