NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
Collaboration diagram for DOCA UROM Domains:

Data Structures

struct  doca_urom_domain_oob_coll
 Out-of-band communication descriptor for Domain creation. More...
 

Typedefs

typedef doca_error_t(* doca_urom_domain_allgather_cb_t) (void *sbuf, void *rbuf, size_t msglen, void *coll_info, void **req)
 Callback for a non-blocking allgather operation. More...
 
typedef doca_error_t(* doca_urom_domain_req_test_cb_t) (void *req)
 Callback to test the status of a non-blocking allgather request. More...
 
typedef doca_error_t(* doca_urom_domain_req_free_cb_t) (void *req)
 Callback to free a non-blocking allgather request. More...
 

Functions

DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_create (struct doca_urom_domain **domain_ctx)
 This method creates a UROM Domain context. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_destroy (struct doca_urom_domain *domain_ctx)
 
DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_set_buffers_count (struct doca_urom_domain *domain_ctx, size_t buffers_cnt)
 This method attaches the number of local buffers that will be added to the Domain. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_add_buffer (struct doca_urom_domain *domain_ctx, void *buffer, size_t buf_len, void *memh, size_t memh_len, void *mkey, size_t mkey_len)
 This method attaches local buffer attributes to the Domain. Should be called after calling doca_urom_domain_set_buffers_count() More...
 
DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_set_oob (struct doca_urom_domain *domain_ctx, struct doca_urom_domain_oob_coll *oob)
 Set OOB communication info to be used for Domain initialization. More...
 
DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_set_workers (struct doca_urom_domain *domain_ctx, uint64_t *domain_worker_ids, struct doca_urom_worker **workers, size_t workers_cnt)
 Set the list of Workers in the domain. More...
 
DOCA_EXPERIMENTAL struct doca_ctx * doca_urom_domain_as_ctx (struct doca_urom_domain *domain_ctx)
 

Detailed Description

DOCA UROM Domain interfaces and data structures.

The UROM Domain represents a collection of UROM Workers working in coordination. Each Worker in the Domain provides a set of memory resources during creation. When the Domain is initialized, memory descriptors are exchanged between all Workers. Workers within a Domain may communicate directly using exchanged these memory descriptors.

Domain initialization is a collective operation. The user is responsible to provide a mechanism for non-blocking allgather communication among all processes which participate in the Domain.

A Domain is only required when using Worker plugins which implement a parallel communication model.

Typedef Documentation

◆ doca_urom_domain_allgather_cb_t

typedef doca_error_t( * doca_urom_domain_allgather_cb_t) (void *sbuf, void *rbuf, size_t msglen, void *coll_info, void **req)

Callback for a non-blocking allgather operation.

Definition at line 1036 of file doca_urom.h.

◆ doca_urom_domain_req_free_cb_t

typedef doca_error_t(* doca_urom_domain_req_free_cb_t) (void *req)

Callback to free a non-blocking allgather request.

Definition at line 1051 of file doca_urom.h.

◆ doca_urom_domain_req_test_cb_t

typedef doca_error_t(* doca_urom_domain_req_test_cb_t) (void *req)

Callback to test the status of a non-blocking allgather request.

Definition at line 1044 of file doca_urom.h.

Function Documentation

◆ doca_urom_domain_add_buffer()

DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_add_buffer ( struct doca_urom_domain *  domain_ctx,
void *  buffer,
size_t  buf_len,
void *  memh,
size_t  memh_len,
void *  mkey,
size_t  mkey_len 
)

This method attaches local buffer attributes to the Domain. Should be called after calling doca_urom_domain_set_buffers_count()

Parameters
[in]domain_ctxThe UROM Domain context to attach the buffers to.
[in]bufferbuffer ready for remote access which are given to the Domain.
[in]buf_lenThe buffer length.
[in]memhThe memory handle for the exported buffer. (should be packed)
[in]memh_lenThe memory handle size.
[in]mkeyThe memory key for the exported buffer. (should be packed)
[in]mkey_lenThe memory key size.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - domain_ctx argument is a NULL pointer.
  • DOCA_ERROR_BAD_STATE - if buffers count wasn't set.
  • DOCA_ERROR_FULL - if buffers array is full, reached the buffer count.

◆ doca_urom_domain_as_ctx()

DOCA_EXPERIMENTAL struct doca_ctx* doca_urom_domain_as_ctx ( struct doca_urom_domain *  domain_ctx)

Convert domain_ctx instance into a generalized context for use with DOCA core objects.

Parameters
[in]domain_ctxDomain context instance. This must remain valid until after the context is no longer required.
Returns
Non NULL upon success, NULL otherwise.

◆ doca_urom_domain_create()

DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_create ( struct doca_urom_domain **  domain_ctx)

This method creates a UROM Domain context.

A Domain is created in state DOCA_CTX_STATE_IDLE. After creation, a user may configure the Domain using setter methods. Before use, a Domain must be transitioned to state DOCA_CTX_STATE_RUNNING using the doca_ctx_start() interface. A typical invocation looks like:

doca_ctx_start(doca_urom_domain_as_ctx(domain_ctx))

Parameters
[out]domain_ctxThe UROM domain.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - domain_ctx argument is a NULL pointer.
  • DOCA_ERROR_NO_MEMORY - failed to allocate domain_ctx.

◆ doca_urom_domain_destroy()

DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_destroy ( struct doca_urom_domain *  domain_ctx)
Parameters
[in]domain_ctxPointer to instance to be destroyed.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_NOT_PERMITTED - Domain ctx state isn't IDLE.
  • DOCA_ERROR_IN_USE - Unable to gain exclusive access to the domain_ctx instance.

◆ doca_urom_domain_set_buffers_count()

DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_set_buffers_count ( struct doca_urom_domain *  domain_ctx,
size_t  buffers_cnt 
)

This method attaches the number of local buffers that will be added to the Domain.

Parameters
[in]domain_ctxThe UROM Domain context to attach the buffers to.
[in]buffers_cntThe number of buffers.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - domain_ctx argument is a NULL pointer.
  • DOCA_ERROR_BAD_STATE - domain_ctx is not idle.
  • DOCA_ERROR_NO_MEMORY - if buffers array allocation failed.

◆ doca_urom_domain_set_oob()

DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_set_oob ( struct doca_urom_domain *  domain_ctx,
struct doca_urom_domain_oob_coll oob 
)

Set OOB communication info to be used for Domain initialization.

Parameters
[in]domain_ctxThe UROM Domain context to set OOB info to.
[in]oobThe OOB communication info to set.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - domain_ctx or oob argument is a NULL pointer.
  • DOCA_ERROR_BAD_STATE - domain_ctx is not idle.
  • DOCA_ERROR_NO_MEMORY - OOB memory allocation failed.

◆ doca_urom_domain_set_workers()

DOCA_EXPERIMENTAL doca_error_t doca_urom_domain_set_workers ( struct doca_urom_domain *  domain_ctx,
uint64_t *  domain_worker_ids,
struct doca_urom_worker **  workers,
size_t  workers_cnt 
)

Set the list of Workers in the domain.

Parameters
[in]domain_ctxThe UROM Domain context to attach the resources to.
[in]domain_worker_idsList of Domain Worker IDs.
[in]workersAn array of UROM Worker contexts which should be part of the domain.
[in]workers_cntThe number of workers in the given array.
Returns
DOCA_SUCCESS - in case of success. doca_error code - in case of failure:
  • DOCA_ERROR_INVALID_VALUE - domain_ctx or workers argument is a NULL pointer.
  • DOCA_ERROR_BAD_STATE - domain_ctx is not idle.
  • DOCA_ERROR_NO_MEMORY - workers buffer allocation failed.