SISCI-API
sisci_types.h File Reference

Data Structures

struct  dis_dma_vec_t
 DMA queue vector interface for function SCIStartDmaTransferVec(). More...
 
struct  sci_smartio_device_info_t
 SmartIO device information. More...
 

Typedefs

typedef struct sci_desc * sci_desc_t
 A variable of type sci_desc_t represents an SISCI virtual device, that is a communication channel with the driver. More...
 
typedef struct sci_local_segment * sci_local_segment_t
 A variable of type sci_local_segment_t represents a local memory segment and it is initialized when the segment is allocated by calling the function SCICreateSegment(). More...
 
typedef struct sci_remote_segment * sci_remote_segment_t
 A variable of type sci_local_segment_t represents a segment residing on a remote node. More...
 
typedef struct sci_map * sci_map_t
 A variable of type sci_map_t represents a memory segment mapped in the process address space. More...
 
typedef struct sci_sequence * sci_sequence_t
 A variable of type sci_sequence_t represents a sequence of operations involving communication with remote nodes. More...
 
typedef struct sci_dma_queue * sci_dma_queue_t
 A variable of type sci_dma_queue_t represents a chain of specifications of data transfers to be performed using the DMA engine available on the adapter or in the system. More...
 
typedef struct sci_dma_channel * sci_dma_channel_t
 Handle to a DMA channel. More...
 
typedef struct sci_remote_interrupt * sci_remote_interrupt_t
 A variable of type sci_remote_interrupt_t represents an interrupt that can be triggered on a remote node. More...
 
typedef struct sci_local_interrupt * sci_local_interrupt_t
 A variable of type sci_local_interrupt_t represents an instance of an interrupt that an application has made available to remote nodes. More...
 
typedef struct sci_remote_data_interrupt * sci_remote_data_interrupt_t
 A variable of type sci_remote_data_interrupt_t represents a data interrupt that can be triggered on a remote node. More...
 
typedef struct sci_local_data_interrupt * sci_local_data_interrupt_t
 A variable of type sci_local_data_interrupt_t represents an instance of a data interrupt that an application has made available to remote nodes. More...
 
typedef struct sci_smartio_device * sci_smartio_device_t
 A variable of type sci_smartio_device_t represents an instance of a device that an application has borrowed from a remote node. More...
 
typedef sci_callback_action_t(* sci_cb_local_segment_t) (void *arg, sci_local_segment_t segment, sci_segment_cb_reason_t reason, unsigned int nodeId, unsigned int localAdapterNo, sci_error_t error)
 Local segment callback. More...
 
typedef sci_callback_action_t(* sci_cb_remote_segment_t) (void *arg, sci_remote_segment_t segment, sci_segment_cb_reason_t reason, sci_error_t status)
 Remote segment callback. More...
 
typedef sci_callback_action_t(* sci_cb_dma_t) (void IN *arg, sci_dma_queue_t queue, sci_error_t status)
 DMA queue callback. More...
 
typedef sci_callback_action_t(* sci_cb_interrupt_t) (void *arg, sci_local_interrupt_t interrupt, sci_error_t status)
 Interrupt callback. More...
 
typedef sci_callback_action_t(* sci_cb_data_interrupt_t) (void *arg, sci_local_data_interrupt_t interrupt, void *data, unsigned int length, sci_error_t status)
 Data Interrupt callback. More...
 
typedef sci_callback_action_t(* sci_cb_device_segment_t) (void *arg, sci_smartio_device_t device, sci_error_t status)
 Device Memory callback. More...
 
typedef sci_callback_action_t(* sci_cb_device_mapping_t) (void *arg, sci_smartio_device_t device, sci_error_t status)
 Device Mapping callback. More...
 

Enumerations

enum  sci_segment_cb_reason_t {
  SCI_CB_CONNECT = 1, SCI_CB_DISCONNECT, SCI_CB_NOT_OPERATIONAL, SCI_CB_OPERATIONAL,
  SCI_CB_LOST, SCI_CB_FATAL
}
 Reasons for segment callbacks. More...
 
enum  sci_dma_queue_state_t
 DMA queue status. More...
 
enum  sci_sequence_status_t { SCI_SEQ_OK, SCI_SEQ_RETRIABLE, SCI_SEQ_NOT_RETRIABLE, SCI_SEQ_PENDING }
 Sequence status. More...
 
enum  sci_callback_action_t { SCI_CALLBACK_CANCEL = 1, SCI_CALLBACK_CONTINUE }
 Callback return values. More...
 

Detailed Description

Data types.

Typedef Documentation

◆ sci_desc_t

typedef struct sci_desc* sci_desc_t

A variable of type sci_desc_t represents an SISCI virtual device, that is a communication channel with the driver.

Many virtual devices can be opened by the same application. It is initialized by calling the function SCIOpen().

◆ sci_local_segment_t

typedef struct sci_local_segment* sci_local_segment_t

A variable of type sci_local_segment_t represents a local memory segment and it is initialized when the segment is allocated by calling the function SCICreateSegment().

◆ sci_remote_segment_t

typedef struct sci_remote_segment* sci_remote_segment_t

A variable of type sci_local_segment_t represents a segment residing on a remote node.

It is initialized by calling the function SCIConnectSegment()

◆ sci_map_t

typedef struct sci_map* sci_map_t

A variable of type sci_map_t represents a memory segment mapped in the process address space.

It is initialized by calling either the function SCIMapRemoteSegment() or the function SCIMapLocalSegment().

◆ sci_sequence_t

typedef struct sci_sequence* sci_sequence_t

A variable of type sci_sequence_t represents a sequence of operations involving communication with remote nodes.

It is used to check if errors have occurred during a data transfer. The descriptor is initialized when the sequence is created by calling the function SCICreateMapSequence().

◆ sci_dma_queue_t

typedef struct sci_dma_queue* sci_dma_queue_t

A variable of type sci_dma_queue_t represents a chain of specifications of data transfers to be performed using the DMA engine available on the adapter or in the system.

The descriptor is initialized when the chain is created by calling the function SCICreateDMAQueue().

◆ sci_dma_channel_t

typedef struct sci_dma_channel* sci_dma_channel_t

Handle to a DMA channel.

Initialized by calling the function SCIRequestDMAChannel().

◆ sci_remote_interrupt_t

typedef struct sci_remote_interrupt* sci_remote_interrupt_t

A variable of type sci_remote_interrupt_t represents an interrupt that can be triggered on a remote node.

It is initialized by calling the function SCIConnectInterrupt().

◆ sci_local_interrupt_t

typedef struct sci_local_interrupt* sci_local_interrupt_t

A variable of type sci_local_interrupt_t represents an instance of an interrupt that an application has made available to remote nodes.

It is initialized when the interrupt is created by calling the function SCICreateInterrupt().

◆ sci_remote_data_interrupt_t

typedef struct sci_remote_data_interrupt* sci_remote_data_interrupt_t

A variable of type sci_remote_data_interrupt_t represents a data interrupt that can be triggered on a remote node.

It is initialized by calling the function SCIConnectDataInterrupt().

◆ sci_local_data_interrupt_t

typedef struct sci_local_data_interrupt* sci_local_data_interrupt_t

A variable of type sci_local_data_interrupt_t represents an instance of a data interrupt that an application has made available to remote nodes.

It is initialized when the interrupt is created by calling the function SCICreateDataInterrupt().

◆ sci_smartio_device_t

typedef struct sci_smartio_device* sci_smartio_device_t

A variable of type sci_smartio_device_t represents an instance of a device that an application has borrowed from a remote node.

It is initialized by calling the function SCIBorrowDevice().

◆ sci_cb_local_segment_t

typedef sci_callback_action_t(* sci_cb_local_segment_t) (void *arg, sci_local_segment_t segment, sci_segment_cb_reason_t reason, unsigned int nodeId, unsigned int localAdapterNo, sci_error_t error)

Local segment callback.

A function of type sci_cb_local_segment_t can be specified when a segment is created with SCICreateSegment() and will be invoked asynchronously when a remote node connects to or disconnects from the segment using respectively SCIConnectSegment() and SCIDisconnectSegment(). The same callback function is also invoked whenever a problem affects the connection.

Parameters
arguser-defined argument passed to the callback function.
segmenthandle to the local segment descriptor affected by the asynchronous event.
reasonreason why the callback function has been invoked.
nodeIdidentifier of the remote node that has provoked, directly or indirectly, the asynchronous event.
localAdapterNonumber of the local adapter that received the asynchronous event.
Returns
SCI_CALLBACK_CANCEL or SCI_CALLBACK_CONTINUE.

◆ sci_cb_remote_segment_t

typedef sci_callback_action_t(* sci_cb_remote_segment_t) (void *arg, sci_remote_segment_t segment, sci_segment_cb_reason_t reason, sci_error_t status)

Remote segment callback.

A function of type sci_cb_remote_segment_t can be specified when the connection to a memory segment is requested calling SCIConnectSegment() and will be invoked asynchronously when the connection completes (if SCIConnectSegment() is asynchronous), when the local node asks for disconnecting (calling SCISetSegmentUnavailable() with the SCI_FLAG_NOTIFY flag) or when a problem affects the connection.

Parameters
arguser-defined argument passed to the callback function.
segmenthandle to the remote segment descriptor.
reasonreason why the callback function has been invoked.
statusstatus of the remote segment.
Returns
SCI_CALLBACK_CANCEL or SCI_CALLBACK_CONTINUE.

◆ sci_cb_dma_t

typedef sci_callback_action_t(* sci_cb_dma_t) (void IN *arg, sci_dma_queue_t queue, sci_error_t status)

DMA queue callback.

A function of type sci_cb_dma_t can be specified for a DMA operation and will be invoked when the transfer has completed, either successfully or with an error.

Parameters
arguser-defined argument passed to the callback function.
queuehandle to the DMA queue descriptor.
statusstatus information for the DMA transfer.

Status codes:

  • SCI_ERR_OK
    Transfer success.
  • SCI_ERR_TRANSFER_FAILED
    Transfer failure.
  • SCI_ERR_CANCELLED
    The callback mechanism was interrupted, due to arrival of signal. SCIDMAQueueState() should be used to determine the status of the transfer.
Returns
SCI_CALLBACK_CANCEL or SCI_CALLBACK_CONTINUE.

◆ sci_cb_interrupt_t

typedef sci_callback_action_t(* sci_cb_interrupt_t) (void *arg, sci_local_interrupt_t interrupt, sci_error_t status)

Interrupt callback.

A function of type sci_cb_interrupt_t can be specified when an interrupt is created with SCICreateInterrupt() and it will be invoked asynchronously when the interrupt will be triggered from a remote node.

Parameters
arguser-defined argument passed to the callback function.
interrupthandle to the triggered interrupt descriptor.
statusstatus information
Returns
SCI_CALLBACK_CANCEL or SCI_CALLBACK_CONTINUE.

◆ sci_cb_data_interrupt_t

typedef sci_callback_action_t(* sci_cb_data_interrupt_t) (void *arg, sci_local_data_interrupt_t interrupt, void *data, unsigned int length, sci_error_t status)

Data Interrupt callback.

A function of type sci_cb_data_interrupt_t can be specified when a data interrupt is created with SCICreateDataInterrupt() and it will be invoked asynchronously when the data interrupt will be triggered from a remote node.

Parameters
arguser-defined argument passed to the callback function.
interrupthandle to the triggered data interrupt descriptor.
datapointer to the interrupt message data
lengthlength of the interrupt message
statusstatus information
Returns
SCI_CALLBACK_CANCEL or SCI_CALLBACK_CONTINUE.

◆ sci_cb_device_segment_t

typedef sci_callback_action_t(* sci_cb_device_segment_t) (void *arg, sci_smartio_device_t device, sci_error_t status)

Device Memory callback.

NOTE: This callback is not yet implemented and it's signature may change in future releases!

Parameters
arguser-defined argument passed to the callback function.
devicethe device this callback relates to.
statusstatus information.
Returns
SCI_CALLBACK_CANCEL or SCI_CALLBACK_CONTINUE.

◆ sci_cb_device_mapping_t

typedef sci_callback_action_t(* sci_cb_device_mapping_t) (void *arg, sci_smartio_device_t device, sci_error_t status)

Device Mapping callback.

NOTE: This callback is not yet implemented and it's signature may change in future releases!

Parameters
arguser-defined argument passed to the callback function.
devicethe device this callback relates to.
statusstatus information.
Returns
SCI_CALLBACK_CANCEL or SCI_CALLBACK_CONTINUE.

Enumeration Type Documentation

◆ sci_segment_cb_reason_t

Reasons for segment callbacks.

It can either be used in local segment callback function or remote segment callback function to indicate the reasons for the segment callback.

Enumerator
SCI_CB_CONNECT 

Used in local segment callback function, it indicates that a remote segment has connected to the local segment.

Used in remote segment callback function, it is currently not implemented.

SCI_CB_DISCONNECT 

Used in local segment callback function, it indicates that a previously connected segment has disconnected with the local segment.

Used in remote segment callback function, it indicates that the local segment has disconnected with a previously connected remote segment.

SCI_CB_NOT_OPERATIONAL 

Indicates that the PCI Express link is no longer operational.

Typical problems: cable unplugged, remote node or switch power cycled etc. Normally followed by a SCI_CB_OPERATIONAL or SCI_CB_LOST.

SCI_CB_OPERATIONAL 

Indicates that the PCI Express link is operational again.

SCI_CB_LOST 

Indicates the session to a remote node has been lost - normally caused by a remote node reboot or reloading of the driver.

All mappings, connections to a remote node should be removed and a full reconnect/remmap of remote resources should be attempted.

SCI_CB_FATAL 

Indicates an uncorrectable error on the adapter PCIe slot (edge connector).

◆ sci_dma_queue_state_t

DMA queue status.

Precise description needed.

◆ sci_sequence_status_t

Sequence status.

The type sci_sequence_status_t enumerates the values returned by SCIStartSequence() and SCICheckSequence(). SCIStartSequence() can only return SCI_SEQ_OK or SCI_SEQ_PENDING.

Enumerator
SCI_SEQ_OK 

no errors: the sequence of reads and writes can continue.

SCI_SEQ_RETRIABLE 

non-fatal error: the failed operation can be immediately retried.

SCI_SEQ_NOT_RETRIABLE 

fatal error (probably notified also via a callback to the segment): need to wait until the situation is normal again.

SCI_SEQ_PENDING 

an error is pending, SCIStartSequence() should be called until it returns SCI_SEQ_OK.

◆ sci_callback_action_t

Callback return values.

Enumerator
SCI_CALLBACK_CANCEL 

A SCI_CALLBACK_CANCEL return value represents that after the callback function has been excuted it will be cancelled.

SCI_CALLBACK_CONTINUE 

A SCI_CALLBACK_CONTINUE return value represents that after the callback function has been excuted it will continue exsit,when the expecated condition is satisfied next time, the callback function will be invoked again.