Programming Interfaces Guide

Cluster Topology Operations

The key interconnect data required for export operations and import operations are:

As a fundamental constraint, the controller specified for a segment import must have a physical connection with the controller used for the associated segment export. This interface defines the interconnect topology, which helps applications establish efficient export and import policies. The data that is provided includes local node ID, local controller instance name, and remote connection specification for each local controller.

An application component that exports memory can use the data provided by the interface to find the set of existing local controllers. The data provided by the interface can also be used to correctly assign controllers for the creation and publishing of segments. Application components can efficiently distribute exported segments over the set of controllers that is consistent with the hardware interconnect and with the application software distribution.

An application component that is importing memory must be informed of the segment IDs and controllers used in the memory export. This information is typically conveyed by a predefined segment and controller pair. The importing component can use the topology data to determine the appropriate controllers for the segment import operations.

rsm_get_interconnect_topology

int rsm_get_interconnect_topology(rsm_topology_t **topology_data);

This function returns a pointer to the topology data in a location specified by an application pointer. The topology data structure is defined next.

Return Values: Returns 0 if successful. Returns an error value otherwise.

RSMERR_BAD_TOPOLOGY_PTR

Invalid topology pointer

RSMERR_INSUFFICIENT_MEM

Insufficient memory

RSMERR_BAD_ADDR

Insufficient memory

rsm_free_interconnect_topology

void rsm_free_interconnect_topology(rsm_topology_t *topology_data);

The rsm_free_interconnect_topology operation frees the memory allocated by rsm_get_interconnect_topology.

Return Values: None.

Data Structures

The pointer returned from rsm_get_topology_data references a rsm_topology_t structure. This structure provides the local node ID and an array of pointers to a connections_t structure for each local controller.

typedef struct rsm_topology {
   rsm_nodeid_t    local_nodeid;
   uint_t          local_cntrl_count;
   connections_t   *connections[1];
} rsm_topology_t;