photon  1.1
Files | Functions
Buffer Management

Functions that allow for the registration and lookup of user memory. Photon requires the registration, or "pinning", of user buffers before RDMA operations are performed. Once registered, backend-specific metadata may be associated with the internal buffer handles. This private data is accessible via the photon_get_buffer_remote() and photon_get_buffer_private() methods. More...

Files

file  photon_buffer.h
 

Functions

int photon_register_buffer (void *addr, uint64_t size)
 
int photon_unregister_buffer (void *addr, uint64_t size)
 
int photon_get_buffer_private (void *addr, uint64_t size, const struct photon_buffer_priv_t **pptr)
 
int photon_get_buffer_remote (photon_rid request, photonBuffer ret_buf)
 

Detailed Description

Functions that allow for the registration and lookup of user memory. Photon requires the registration, or "pinning", of user buffers before RDMA operations are performed. Once registered, backend-specific metadata may be associated with the internal buffer handles. This private data is accessible via the photon_get_buffer_remote() and photon_get_buffer_private() methods.

Function Documentation

◆ photon_get_buffer_private()

int photon_get_buffer_private ( void *  addr,
uint64_t  size,
const struct photon_buffer_priv_t **  pptr 
)

Get the private metadata associated with a user buffer defined by addr and size.

Parameters
addrA pointer to the user buffer to query
sizeThe size of the user buffer in bytes
pptrA reference to a photon_buffer_priv_t struct pointer that will point to the private buffer data on successful return
Returns
PHOTON_OK on success or an error code

Definition at line 585 of file libphoton.c.

◆ photon_get_buffer_remote()

int photon_get_buffer_remote ( photon_rid  request,
photonBuffer  ret_buf 
)

Get the private metadata associated with a remote buffer exchanged using the rendezvous interface and identified by request.

Parameters
requestThe request associated with a send/recv buffer
ret_bufA pointer to a photon_buffer_t struct that will be filled in with the buffer metadata on successful return
Returns
PHOTON_OK on success or an error code

Definition at line 591 of file libphoton.c.

◆ photon_register_buffer()

int photon_register_buffer ( void *  addr,
uint64_t  size 
)

Register a user buffer with the Photon library. This must be called before the addr is used in any subsequent Photon RDMA call.

Parameters
addrA pointer to the user buffer to register
sizeThe size of the user buffer in bytes
Returns
PHOTON_OK on success or an error code

Definition at line 370 of file libphoton.c.

◆ photon_unregister_buffer()

int photon_unregister_buffer ( void *  addr,
uint64_t  size 
)

Unregisters a user buffer that was previously registered with photon_register_buffer(). This method frees the Photon internal buffer handle and private metadata associated with addr and size.

Parameters
addrA pointer to the user buffer to unregister
sizeThe size of the user buffer in bytes
Returns
PHOTON_OK on success or an error code

Definition at line 374 of file libphoton.c.