SISCI-API
|
Macros | |
#define | SCITerminate(void) _SISCI_EXPANDE_FUNCTION_NAME(SCITerminate) |
Terminates and releases resources associated with the SISCI library. More... | |
Functions | |
SISCI_API_EXPORT void | SCIInitialize (unsigned int flags, sci_error_t *error) |
Initializes the SISCI library. More... | |
SISCI_API_EXPORT void | SCIOpen (sci_desc_t *sd, unsigned int flags, sci_error_t *error) |
Opens an SISCI virtual device. More... | |
SISCI_API_EXPORT void | SCIClose (sci_desc_t sd, unsigned int flags, sci_error_t *error) |
Closes an open SISCI virtual device. More... | |
SISCI_API_EXPORT void | SCIConnectSegment (sci_desc_t sd, sci_remote_segment_t *segment, unsigned int nodeId, unsigned int segmentId, unsigned int localAdapterNo, sci_cb_remote_segment_t callback, void *callbackArg, unsigned int timeout, unsigned int flags, sci_error_t *error) |
Connects an application to a memory segment. More... | |
SISCI_API_EXPORT void | SCIDisconnectSegment (sci_remote_segment_t segment, unsigned int flags, sci_error_t *error) |
SCIDisconnectSegment() disconnects from the give mapped shared memory segment. More... | |
SISCI_API_EXPORT size_t | SCIGetRemoteSegmentSize (sci_remote_segment_t segment) |
SCIGetRemoteSegmentSize() returns the size in bytes of a remote segment after it has been connected with SCIConnectSegment(). More... | |
SISCI_API_EXPORT unsigned int | SCIGetRemoteSegmentId (sci_remote_segment_t segment) |
Retrieve the segment identifier of a remote segment connected with SCIConnectSegment(). More... | |
SISCI_API_EXPORT unsigned int | SCIGetRemoteSegmentNodeId (sci_remote_segment_t segment) |
Retrieve the node identifier of the remote or local node where the connected segment is hosted. More... | |
SISCI_API_EXPORT volatile void * | SCIGetMapPointer (sci_map_t map) |
Retrieve a memory pointer of a previously mapped segment. More... | |
SISCI_API_EXPORT sci_ioaddr_t | SCIGetMapPhysAddr (sci_map_t map) |
Retrieve the local physical address of the mapped segment. More... | |
SISCI_API_EXPORT sci_segment_cb_reason_t | SCIWaitForRemoteSegmentEvent (sci_remote_segment_t segment, sci_error_t *status, unsigned int timeout, unsigned int flags, sci_error_t *error) |
SCIWaitForRemoteSegmentEvent() blocks a program until an event concerning the remote segment has arrived. More... | |
SISCI_API_EXPORT volatile void * | SCIMapRemoteSegment (sci_remote_segment_t segment, sci_map_t *map, size_t offset, size_t size, void *addr, unsigned int flags, sci_error_t *error) |
SCIMapRemoteSegment() maps an area of a remote segment connected with SCIConnectSegment() into the addressable space of the program and returns a pointer to the beginning of the mapped area. More... | |
SISCI_API_EXPORT void * | SCIMapLocalSegment (sci_local_segment_t segment, sci_map_t *map, size_t offset, size_t size, void *addr, unsigned int flags, sci_error_t *error) |
SCIMapLocalSegment() maps an area of a memory segment created with SCICreateSegment() into the addressable space of the program and returns a pointer to the beginning of the mapped area. More... | |
SISCI_API_EXPORT void | SCIUnmapSegment (sci_map_t map, unsigned int flags, sci_error_t *error) |
SCIUnmapSegment() unmaps from the programs address space a segment that was mapped either with SCIMapLocalSegment() or with SCIMapRemoteSegment(). More... | |
SISCI_API_EXPORT void | SCICreateSegment (sci_desc_t sd, sci_local_segment_t *segment, unsigned int segmentId, size_t size, sci_cb_local_segment_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
SCICreateSegment() allocates a memory segment and creates and initializes a descriptor for a local segment. More... | |
SISCI_API_EXPORT sci_segment_cb_reason_t | SCIWaitForLocalSegmentEvent (sci_local_segment_t segment, unsigned int *sourcenodeId, unsigned int *localAdapterNo, unsigned int timeout, unsigned int flags, sci_error_t *error) |
SCIWaitForLocalSegmentEvent() blocks a program until an event concerning the local segment has arrived. More... | |
SISCI_API_EXPORT void | SCIPrepareSegment (sci_local_segment_t segment, unsigned int localAdapterNo, unsigned int flags, sci_error_t *error) |
SCIPrepareSegment() enables a local segment to be accessible from the specified network adapter. More... | |
SISCI_API_EXPORT void | SCIRemoveSegment (sci_local_segment_t segment, unsigned int flags, sci_error_t *error) |
SCIRemoveSegment() frees the resources used by a local segment. More... | |
SISCI_API_EXPORT size_t | SCIGetLocalSegmentSize (sci_local_segment_t segment) |
SCIGetLocalSegmentSize() returns the size in bytes of a local segment after it has been created with SCICreateSegment(). More... | |
SISCI_API_EXPORT unsigned int | SCIGetLocalSegmentId (sci_local_segment_t segment) |
Retrieve the segment identifier of a local segment created with SCICreateSegment(). More... | |
SISCI_API_EXPORT void | SCISetSegmentAvailable (sci_local_segment_t segment, unsigned int localAdapterNo, unsigned int flags, sci_error_t *error) |
SCISetSegmentAvailable() makes a local segment visible to remote nodes, that can then connect to it. More... | |
SISCI_API_EXPORT void | SCISetSegmentUnavailable (sci_local_segment_t segment, unsigned int localAdapterNo, unsigned int flags, sci_error_t *error) |
SCISetSegmentUnavailable() hides an available segment to remote nodes; no new connections will be accepted on that segment. More... | |
SISCI_API_EXPORT void | SCICreateMapSequence (sci_map_t map, sci_sequence_t *sequence, unsigned int flags, sci_error_t *error) |
SCICreateMapSequence() creates and initializes a new sequence descriptor that can be used to check for errors occurring in a transfer of data from or to a mapped segment. More... | |
SISCI_API_EXPORT void | SCIRemoveSequence (sci_sequence_t sequence, unsigned int flags, sci_error_t *error) |
SCIRemoveSequence() destroys a sequence descriptor. More... | |
SISCI_API_EXPORT sci_sequence_status_t | SCIStartSequence (sci_sequence_t sequence, unsigned int flags, sci_error_t *error) |
SCIStartSequence() performs the preliminary check of the error flags on the network adapter before starting a sequence of read and write operations on the concerned mapped segment. More... | |
SISCI_API_EXPORT sci_sequence_status_t | SCICheckSequence (sci_sequence_t sequence, unsigned int flags, sci_error_t *error) |
SCICheckSequence() checks if any error has occurred in a data transfer controlled by a sequence since the last check. More... | |
SISCI_API_EXPORT void | SCIStoreBarrier (sci_sequence_t sequence, unsigned int flags) |
SCIStoreBarrier() synchronizes all PIO accesses to a mapped segment. More... | |
SISCI_API_EXPORT int | SCIProbeNode (sci_desc_t sd, unsigned int localAdapterNo, unsigned int nodeId, unsigned int flags, sci_error_t *error) |
SCIProbeNode() checks if a remote node is reachable. More... | |
SISCI_API_EXPORT void | SCIAttachPhysicalMemory (sci_ioaddr_t ioaddress, void *address, unsigned int busNo, size_t size, sci_local_segment_t segment, unsigned int flags, sci_error_t *error) |
SISCI Privileged function SCIAttachPhysicalMemory() enables usage of physical devices and memory regions where the Physical PCI/PCIe bus address ( and mapped CPU address ) are already known. More... | |
SISCI_API_EXPORT void | SCIQuery (unsigned int command, void *data, unsigned int flags, sci_error_t *error) |
SCIQuery() provides an interface to request various information from the system, settings and interconnect status. More... | |
SISCI_API_EXPORT void | SCIGetLocalNodeId (unsigned int adapterNo, unsigned int *nodeId, unsigned int flags, sci_error_t *error) |
Get local node id. More... | |
SISCI_API_EXPORT void | SCIGetNodeIdByAdapterName (char *adaptername, dis_nodeId_list_t *nodeId, dis_virt_adapter_t *type, unsigned int flags, sci_error_t *error) |
The function SCIGetNodeIByAdapterName() provides an interface to query the nodeId and adapter type for an adapter in the cluster specified by its name. More... | |
SISCI_API_EXPORT void | SCIGetNodeInfoByAdapterName (char *adaptername, unsigned int *adapterNo, dis_nodeId_list_t *nodeIdlist, dis_virt_adapter_t *type, unsigned int flags, sci_error_t *error) |
Function description missing. More... | |
const SISCI_API_EXPORT char * | SCIGetErrorString (sci_error_t error) |
Get error description from a SISCI error code. More... | |
SISCI_API_EXPORT void | SCICreateDMAQueue (sci_desc_t sd, sci_dma_queue_t *dq, unsigned int localAdapterNo, unsigned int maxEntries, unsigned int flags, sci_error_t *error) |
SCICreateDMAQueue() allocates resources for a queue of DMA transfers and creates and initializes a descriptor for the new queue. More... | |
SISCI_API_EXPORT void | SCIRemoveDMAQueue (sci_dma_queue_t dq, unsigned int flags, sci_error_t *error) |
SCIRemoveDMAQueue() frees the resources allocated for a DMA queue and destroys the corresponding descriptor. More... | |
SISCI_API_EXPORT void | SCIAbortDMAQueue (sci_dma_queue_t dq, unsigned int flags, sci_error_t *error) |
SCIAbortDMAQueue() aborts a DMA transfer initiated with SCIStartDmaTransfer() or SCIStartDmaTransferVec(). More... | |
SISCI_API_EXPORT sci_dma_queue_state_t | SCIDMAQueueState (sci_dma_queue_t dq) |
SCIDMAQueueState() returns the state of a DMA queue (see sci_dma_queue_state_t). More... | |
SISCI_API_EXPORT sci_dma_queue_state_t | SCIWaitForDMAQueue (sci_dma_queue_t dq, unsigned int timeout, unsigned int flags, sci_error_t *error) |
SCIWaitForDMAQueue() blocks a program until a DMA queue has finished (because of the completion of all the transfers or due to an error) or the timeout has expired. More... | |
SISCI_API_EXPORT void | SCICreateInterrupt (sci_desc_t sd, sci_local_interrupt_t *interrupt, unsigned int localAdapterNo, unsigned int *interruptNo, sci_cb_interrupt_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
SCICreateInterrupt() creates an interrupt resource and makes it available to remote nodes and initializes a descriptor for the interrupt. More... | |
SISCI_API_EXPORT void | SCIRemoveInterrupt (sci_local_interrupt_t interrupt, unsigned int flags, sci_error_t *error) |
SCIRemoveInterrupt() deallocates an interrupt resource and destroys the corresponding descriptor. More... | |
SISCI_API_EXPORT void | SCIWaitForInterrupt (sci_local_interrupt_t interrupt, unsigned int timeout, unsigned int flags, sci_error_t *error) |
SCIWaitForInterrupt() blocks a program until an interrupt is received. More... | |
SISCI_API_EXPORT void | SCIConnectInterrupt (sci_desc_t sd, sci_remote_interrupt_t *interrupt, unsigned int nodeId, unsigned int localAdapterNo, unsigned int interruptNo, unsigned int timeout, unsigned int flags, sci_error_t *error) |
SCIConnectInterrupt() connects the caller to an interrupt resource available on a remote node (see SCICreateInterrupt()). More... | |
SISCI_API_EXPORT void | SCIDisconnectInterrupt (sci_remote_interrupt_t interrupt, unsigned int flags, sci_error_t *error) |
SCIDisconnectInterrupt() disconnects an application from a remote interrupt resource and deallocates the corresponding descriptor. More... | |
SISCI_API_EXPORT void | SCITriggerInterrupt (sci_remote_interrupt_t interrupt, unsigned int flags, sci_error_t *error) |
SCITriggerInterrupt() triggers an interrupt on a remote node, after having connected to it with SCIConnectInterrupt(). More... | |
SISCI_API_EXPORT void | SCICreateDataInterrupt (sci_desc_t sd, sci_local_data_interrupt_t *interrupt, unsigned int localAdapterNo, unsigned int *interruptNo, sci_cb_data_interrupt_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
SCICreateDataInterrupt() creates a data interrupt resource and makes it available to remote nodes and initializes a descriptor for the interrupt. More... | |
SISCI_API_EXPORT void | SCIRemoveDataInterrupt (sci_local_data_interrupt_t interrupt, unsigned int flags, sci_error_t *error) |
SCIRemoveDataInterrupt() deallocates a data interrupt resource and destroys the corresponding descriptor. More... | |
SISCI_API_EXPORT void | SCIWaitForDataInterrupt (sci_local_data_interrupt_t interrupt, void *data, unsigned int *length, unsigned int timeout, unsigned int flags, sci_error_t *error) |
SCIWaitForDataInterrupt() blocks a program until a data interrupt is received. More... | |
SISCI_API_EXPORT void | SCIConnectDataInterrupt (sci_desc_t sd, sci_remote_data_interrupt_t *interrupt, unsigned int nodeId, unsigned int localAdapterNo, unsigned int interruptNo, unsigned int timeout, unsigned int flags, sci_error_t *error) |
SCIConnectDataInterrupt() connects the caller to a data interrupt resource available on a remote node (see SCICreateDataInterrupt()). More... | |
SISCI_API_EXPORT void | SCIDisconnectDataInterrupt (sci_remote_data_interrupt_t interrupt, unsigned int flags, sci_error_t *error) |
SCIDisconnectDataInterrupt() disconnects an application from a remote data interrupt resource and deallocates the corresponding descriptor. More... | |
SISCI_API_EXPORT void | SCITriggerDataInterrupt (sci_remote_data_interrupt_t interrupt, void *data, unsigned int length, unsigned int flags, sci_error_t *error) |
SCITriggerDataInterrupt() sends an interrupt message to a remote node, after having connected to it with SCIConnectDataInterrupt(). More... | |
SISCI_API_EXPORT void | SCIMemWrite (void *memAddr, volatile void *remoteAddr, size_t size, unsigned int flags, sci_error_t *error) |
SCIMemWrite() transfers efficiently a block of data from local memory to a mapped segment using the shared memory mode. More... | |
SISCI_API_EXPORT void | SCIMemCpy (sci_sequence_t sequence, void *memAddr, sci_map_t remoteMap, size_t remoteOffset, size_t size, unsigned int flags, sci_error_t *error) |
SCIMemCpy() transfers efficiently a block of data from local memory to a mapped segment using the shared memory mode. More... | |
SISCI_API_EXPORT void | SCIRegisterSegmentMemory (void *address, size_t size, sci_local_segment_t segment, unsigned int flags, sci_error_t *error) |
SCIRegisterSegmentMemory() associates an area memory allocated by the program (eg using malloc) with a local segment. More... | |
SISCI_API_EXPORT void | SCIAttachLocalSegment (sci_desc_t sd, sci_local_segment_t *segment, unsigned int segmentId, size_t *size, sci_cb_local_segment_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
SCIAttachLocalSegment() permits an application to "attach" to an already existing local segment, implying that two or more application want share the same local segment. More... | |
SISCI_API_EXPORT void | SCIShareSegment (sci_local_segment_t segment, unsigned int flags, sci_error_t *error) |
SCIShareSegment() permits other application to "attach" to an already existing local segment, implying that two or more application want share the same local segment. More... | |
SISCI_API_EXPORT void | SCIFlush (sci_sequence_t sequence, unsigned int flags) |
SCIFlush() flushes the CPU write combining buffers of the local system. More... | |
SISCI_API_EXPORT void | SCIStartDmaTransfer (sci_dma_queue_t dq, sci_local_segment_t localSegment, sci_remote_segment_t remoteSegment, size_t localOffset, size_t size, size_t remoteOffset, sci_cb_dma_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
SCIStartDmaTransfer() starts the execution of a DMA queue. More... | |
SISCI_API_EXPORT void | SCIStartDmaTransferMem (sci_dma_queue_t dq, void *localAddress, sci_remote_segment_t remoteSegment, size_t size, size_t remoteOffset, sci_cb_dma_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
SCIStartDmaTransferMem starts the execution of a DMA queue based on a user-allocated memory buffer. More... | |
SISCI_API_EXPORT void | SCIStartDmaTransferVec (sci_dma_queue_t dq, sci_local_segment_t localSegment, sci_remote_segment_t remoteSegment, size_t vecLength, dis_dma_vec_t *disDmaVec, sci_cb_dma_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
SCIStartDmaTransferVec() starts the execution of a DMA queue. More... | |
SISCI_API_EXPORT void | SCIRequestDMAChannel (sci_desc_t sd, sci_dma_channel_t *channel, unsigned int localAdapterNo, sci_dma_type_t type, unsigned int channelId, unsigned int flags, sci_error_t *error) |
NOTE: This function is not yet finalized and may change without notice! More... | |
SISCI_API_EXPORT void | SCIReturnDMAChannel (sci_dma_channel_t channel, sci_error_t *error) |
NOTE: This function is not yet finalized and may change without notice! More... | |
SISCI_API_EXPORT void | SCIAssignDMAChannel (sci_dma_channel_t channel, sci_dma_queue_t dq, unsigned int flags, sci_error_t *error) |
NOTE: This function is not yet finalized and may change without notice! More... | |
SISCI_API_EXPORT sci_dma_type_t | SCIGetDMAChannelType (sci_dma_channel_t channel) |
SCIGetDMAChannelType() returns the type of a DMA channel requested through SCIRequestDMAChannel(). More... | |
SISCI_API_EXPORT void | SCIPrepareLocalSegmentForDMA (sci_dma_channel_t channel, sci_local_segment_t local_segment, unsigned int flags, sci_error_t *error) |
NOTE: This function is not yet finalized and may change without notice! More... | |
SISCI_API_EXPORT void | SCIUnprepareLocalSegmentForDMA (sci_dma_channel_t channel, sci_local_segment_t local_segment, unsigned int flags, sci_error_t *error) |
NOTE: This function is not yet finalized and may change without notice! More... | |
SISCI_API_EXPORT void | SCIPrepareRemoteSegmentForDMA (sci_dma_channel_t channel, sci_remote_segment_t remote_segment, unsigned int flags, sci_error_t *error) |
NOTE: This function is not yet finalized and may change without notice! More... | |
SISCI_API_EXPORT void | SCIUnprepareRemoteSegmentForDMA (sci_dma_channel_t channel, sci_remote_segment_t remote_segment, unsigned int flags, sci_error_t *error) |
NOTE: This function is not yet finalized and may change without notice! More... | |
SISCI_API_EXPORT void | SCICacheSync (sci_map_t map, void *addr, size_t length, unsigned int flags, sci_error_t *error) |
SCICacheSync() is used to control the CPU cache. More... | |
SISCI_API_EXPORT void | SCIRegisterPCIeRequester (sci_desc_t sd, unsigned int localAdapterNo, unsigned int bus, unsigned int devfn, unsigned int flags, sci_error_t *error) |
SCIRegisterPCIeRequester() registers a local PCIe requester with the NT function so that it can send traffic through the NTB. More... | |
SISCI_API_EXPORT void | SCIUnregisterPCIeRequester (sci_desc_t sd, unsigned int localAdapterNo, unsigned int bus, unsigned int devfn, unsigned int flags, sci_error_t *error) |
SCIUnregisterPCIeRequester() unregisters a local PCIe requester from the NT function. More... | |
SISCI_API_EXPORT void | SCIBorrowDevice (sci_desc_t sd, sci_smartio_device_t *device, unsigned long long fdid, unsigned int flags, sci_error_t *error) |
Borrows a SmartIO device. More... | |
SISCI_API_EXPORT void | SCIReturnDevice (sci_smartio_device_t device, unsigned int flags, sci_error_t *error) |
Undo SCIBorrowDevice by releasing the borrowed device. More... | |
SISCI_API_EXPORT void | SCIReleaseExclusiveBorrow (sci_smartio_device_t device, unsigned int flags, sci_error_t *error) |
Release the exclusive lock on a borrowed device, allowing others to use the device concurrently. More... | |
SISCI_API_EXPORT void | SCIConnectDeviceSegment (sci_smartio_device_t device, sci_remote_segment_t *segment, unsigned int segmentId, unsigned int segmentType, sci_cb_device_segment_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
Connects an application to a device memory segment. More... | |
SISCI_API_EXPORT void | SCIConnectDeviceSegmentPath (sci_smartio_device_t device, sci_remote_segment_t *segment, unsigned int nodeId, unsigned int segmentId, unsigned int segmentType, unsigned int localAdapterNo, sci_cb_device_segment_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
This function is identical to SCIConnectDeviceSegment(), except the path (local adapter and node ID) is specified manually. More... | |
SISCI_API_EXPORT void | SCICreateDeviceSegment (sci_smartio_device_t device, unsigned int segmentId, size_t size, unsigned int type, unsigned int accessHints, unsigned int flags, sci_error_t *error) |
Creates a memory segment and associates it with a device. More... | |
SISCI_API_EXPORT void | SCIMapLocalSegmentForDevice (sci_local_segment_t segment, unsigned int localAdapterNo, sci_smartio_device_t device, sci_ioaddr_t *remoteAddr, size_t offset, size_t size, sci_cb_device_mapping_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
Sets up access to a local segment for device that is being borrowed from a remote node, allowing the device to DMA to the segment using remoteAddr. More... | |
SISCI_API_EXPORT void | SCIUnmapLocalSegmentForDevice (sci_local_segment_t segment, unsigned int localAdapterNo, sci_smartio_device_t device, unsigned int flags, sci_error_t *error) |
Undo SCIMapLocalSegmentForDevice(). More... | |
SISCI_API_EXPORT void | SCIMapRemoteSegmentForDevice (sci_remote_segment_t segment, sci_smartio_device_t device, sci_ioaddr_t *remoteAddr, size_t offset, size_t size, sci_cb_device_mapping_t callback, void *callbackArg, unsigned int flags, sci_error_t *error) |
Sets up access to a remote segment for device that is being borrowed from a remote node, allowing the device to DMA to the segment using remoteAddr. More... | |
SISCI_API_EXPORT void | SCIUnmapRemoteSegmentForDevice (sci_remote_segment_t segment, sci_smartio_device_t device, unsigned int flags, sci_error_t *error) |
Undo SCIMapRemoteSegmentForDevice(). More... | |
SISCI_API_EXPORT size_t | SCIGetDeviceList (sci_desc_t sd, unsigned long long *fdids, size_t length, const sci_smartio_device_info_t *filter, unsigned int flags, sci_error_t *error) |
Retrieve a list of fabric device identifiers of SmartIO devices discovered by the local node. More... | |
SISCI_API_EXPORT unsigned long long | SCIGetFabricDeviceId (sci_smartio_device_t device) |
Get fabric device identifier of SmartIO device. More... | |
Variables | |
const SISCI_API_EXPORT unsigned int | SCI_FLAG_BROADCAST |
Enable Multicast. More... | |
const SISCI_API_EXPORT unsigned int | SCI_FLAG_LOCK_USER_MEM |
Pin user memory. More... | |
The SISCI API implementation from Dolphin is available with Dolphins IX, PX, MX and Intel NTB (INX) enabled PCI Express products and for various 3rd party OEM hardware solutions licensing the software.
Some extensions, for example Reflective Memory is only available for some hardware configurations. Please consult your hardware vendor and software release notes for details.
Please read the manual carefully and consult the available SISCI example code found in the software distribution / SISCI Devel package as well as the SISCI Users guide available for download from http://www.dolphinics.com Low-level SISCI software functional specification.
SISCI_API_EXPORT void SCITerminate | ( | void | ) | _SISCI_EXPANDE_FUNCTION_NAME(SCITerminate) |
Terminates and releases resources associated with the SISCI library.
SCITerminate() must be called after SCIClose().
Error codes:
SISCI_API_EXPORT void SCIInitialize | ( | unsigned int | flags, |
sci_error_t * | error | ||
) |
Initializes the SISCI library.
SCIInitialize() must be called before SCIOpen().
flags | see below |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIOpen | ( | sci_desc_t * | sd, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Opens an SISCI virtual device.
SCIOpen() opens an SISCI virtual device, that is a channel to the driver. It creates and initializes a new descriptor for an SISCI virtual device, to be used in subsequent calls to API functions. A single virtual device can be used for all API functions, but only one of each resource type. E.g. if you want to do multiple connections, multiple virtual devices needs to be opened.
sd | handle to the new SISCI virtual device descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIClose | ( | sci_desc_t | sd, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Closes an open SISCI virtual device.
SCIClose() closes an open SISCI virtual device, destroying its descriptor. After this call the handle to the descriptor becomes invalid and should not be used. SCIClose does not deallocate possible resources that are still in use, rather it fails if some of them exist.
sd | handle to an open SISCI virtual device descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIConnectSegment | ( | sci_desc_t | sd, |
sci_remote_segment_t * | segment, | ||
unsigned int | nodeId, | ||
unsigned int | segmentId, | ||
unsigned int | localAdapterNo, | ||
sci_cb_remote_segment_t | callback, | ||
void * | callbackArg, | ||
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Connects an application to a memory segment.
SCIConnectSegment() connects an application to a memory segment made available on a local or remote node (see SCISetSegmentAvailable()) and creates and initializes a
descriptor for the connected segment. A call to this function enters the
state diagram for a remote segment shown in Figure State diagram for remote segments. If a timeout
different from SCI_INFINITE_TIMEOUT is passed to the function, the attempt
to connect will stop after the specified number of milliseconds. Implementation notice: Dolphin has not implemented support for setting a timeout different from SCI_INFINITE_TIMEOUT.
The connection operation is by default synchronous: the function returns only
when the operation has completed; a failure exits the state diagram and
gives back a handle that is not valid and that should not be used.
If the flag SCI_FLAG_ASYNCHRONOUS_CONNECT is specified the connection is
instead asynchronous: the function returns immediately with a valid handle. In case of failure, the descriptor has to be explicitly destroyed calling
SCIDisconnectSegment(). Implementation notice: The SCI_FLAG_ASYNCHRONOUS_CONNECT is not implemented by Dolphin.
A callback function can be specified to be invoked when an event concerning the segment happens; the intention to use the callback has to be explicitly declared with the flag SCI_FLAG_USE_CALLBACK. Alternatively, interesting
events can be caught using the function SCIWaitForRemoteSegmentEvent.
Once a memory segment has been connected, it can either be mapped in the
address space of the program, see SCIMapRemoteSegment() or be used directly for DMA transfers, (see SCIEnqueueDMATransfer()). A successful connection also generates an SCI_CB_CONNECT event directed to the application that created
the segment (see SCICreateSegment() and sci_cb_local_segment_t).
sd | handle to an open SISCI virtual device descriptor |
segment | handle to the new connected segment descriptor |
nodeId | identifier of the node where the segment is allocated |
segmentId | identifier of the segment to connect |
localAdapterNo | number of the local adapter used for the connection |
callback | function called when an asynchronous event affecting the segment occurs |
callbackArg | user-defined parameter passed to the callback function |
timeout | time in milliseconds to wait for the connection to complete. Currently not implemented, parameter should always be set to SCI_INFINITE_TIMEOUT |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIDisconnectSegment | ( | sci_remote_segment_t | segment, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIDisconnectSegment() disconnects from the give mapped shared memory segment.
SCIDisconnectSegment() disconnects from a remote segment connected by calling SCIConnectSegment() and deallocates the
corresponding descriptor. After this call the handle to the descriptor
becomes invalid and should not be used.
If the segment was connected using SCIConnectSegment() the execution of
SCIDisconnectSegment also generates an SCI_CB_DISCONNECT event directed to the application that created the segment (see SCICreateSegment() and
sci_cb_local_segment_t).
segment | handle to the connected segment descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT size_t SCIGetRemoteSegmentSize | ( | sci_remote_segment_t | segment | ) |
SCIGetRemoteSegmentSize() returns the size in bytes of a remote segment after it has been connected with SCIConnectSegment().
segment | handle to the connected segment descriptor |
SISCI_API_EXPORT unsigned int SCIGetRemoteSegmentId | ( | sci_remote_segment_t | segment | ) |
Retrieve the segment identifier of a remote segment connected with SCIConnectSegment().
segment | handle to the connected segment descriptor |
SISCI_API_EXPORT unsigned int SCIGetRemoteSegmentNodeId | ( | sci_remote_segment_t | segment | ) |
Retrieve the node identifier of the remote or local node where the connected segment is hosted.
segment | handle to the connected segment descriptor |
SISCI_API_EXPORT volatile void* SCIGetMapPointer | ( | sci_map_t | map | ) |
Retrieve a memory pointer of a previously mapped segment.
This is the same pointer as returned by the original call to SCIMapLocalSegment() or SCIMapRemoteSegment().
Introduced in DIS release 5.16.0
map | handle to the mapped segment descriptor |
SISCI_API_EXPORT sci_ioaddr_t SCIGetMapPhysAddr | ( | sci_map_t | map | ) |
Retrieve the local physical address of the mapped segment.
If the segment is local, this is the physical address of the segment. If the segment is remote, this address is the physical address that maps over the local adapter.
Introduced in DIS release 5.16.0
map | handle to the mapped segment descriptor |
SISCI_API_EXPORT sci_segment_cb_reason_t SCIWaitForRemoteSegmentEvent | ( | sci_remote_segment_t | segment, |
sci_error_t * | status, | ||
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIWaitForRemoteSegmentEvent() blocks a program until an event concerning the remote segment has arrived.
If a timeout different from SCI_INFINITE_TIMEOUT is specified the function gives up when the timeout expires. SCIWaitForRemoteSegmentEvent() cannot be used if a callback associated with the remote segment is active (see SCIConnectSegment()).
segment | handle to the connected segment descriptor |
status | status information |
timeout | time in milliseconds to wait before giving up |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT volatile void* SCIMapRemoteSegment | ( | sci_remote_segment_t | segment, |
sci_map_t * | map, | ||
size_t | offset, | ||
size_t | size, | ||
void * | addr, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIMapRemoteSegment() maps an area of a remote segment connected with SCIConnectSegment() into the addressable space of the program and returns a pointer to the beginning of the mapped area.
The function also creates and initializes a descriptor for the mapped segment.
If a virtual address is suggested, together with the flag SCI_FLAG_FIXED_MAP_ADDR, the function tries first to map the segment at that address. If the flag SCI_FLAG_READONLY_MAP is specified, the remote segment is mapped read-only.
Flags:
Error codes:
SISCI_API_EXPORT void* SCIMapLocalSegment | ( | sci_local_segment_t | segment, |
sci_map_t * | map, | ||
size_t | offset, | ||
size_t | size, | ||
void * | addr, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIMapLocalSegment() maps an area of a memory segment created with SCICreateSegment() into the addressable space of the program and returns a pointer to the beginning of the mapped area.
The function also creates and initializes a descriptor for the mapped segment.
If a virtual address is suggested, together with the flag SCI_FLAG_FIXED_MAP_ADDR, the function tries first to map the segment at that address. If the flag SCI_FLAG_READONLY_MAP is specified, the local segment is mapped in read-only more.
segment | handle to the descriptor of the local segment to be mapped |
map | handle to the new mapped segment descriptor |
offset | offset inside the local segment where the mapping should start |
size | size of the area of the local segment to be mapped, starting from offset |
addr | suggested virtual address where the segment should be mapped |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIUnmapSegment | ( | sci_map_t | map, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIUnmapSegment() unmaps from the programs address space a segment that was mapped either with SCIMapLocalSegment() or with SCIMapRemoteSegment().
It also destroys the corresponding descriptor, therefore after this call the handle to the descriptor becomes invalid and should not be used.
map | handle to the mapped segment descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCICreateSegment | ( | sci_desc_t | sd, |
sci_local_segment_t * | segment, | ||
unsigned int | segmentId, | ||
size_t | size, | ||
sci_cb_local_segment_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCICreateSegment() allocates a memory segment and creates and initializes a descriptor for a local segment.
A host-wide unique identifier is associated to the new segment. This function causes a local segment to enter its state diagram, shown in Figure Local segment state diagram.
A callback function can be specified to be invoked when an event concerning the segment happens (see sci_segment_cb_reason_t); the intention to use the callback has to be explicitly declared with the flag SCI_FLAG_USE_CALLBACK. Alternatively, interesting events can be caught using the function SCIWaitForLocalSegmentEvent().
If the flag SCI_FLAG_EMPTY is specified, no memory is allocated for the segment and only the descriptor is initialized. Using the flag SCI_FLAG_PRIVATE declares that the segment will never be made available for external connections (see SCISetSegmentAvailable()); in this case the specified segment identifier is meaningless, avoiding the internal check for its uniqueness. These two flags are useful to transform a user-allocated piece of memory (e.g. via malloc) into a mapped segment. An empty and private segment is first created and then associated to the user-allocated memory (see SCIRegisterSegmentMemory()); the segment can then be transformed in a mapped segment (see SCIMapLocalSegment()) and possibly prepared for a DMA transfer (see SCIPrepareSegment()).
SCICreateSegment() will fail with the error code SCI_ERR_NOSPC if the driver / system did not manage to allocate the required amount of memory. Please consult the eXpressWare installation guide, section "Managing PCIe and eXpressWare Resources" for additional information on how to tune resources.
sd | handle to an open SISCI virtual device descriptor |
segment | handle to the new local segment descriptor |
segmentId | segment identifier |
size | segment size; if SCI_FLAG_EMPTY is specified, size means the maximum size of the memory area that can be associated with this local segment |
callback | callback function called when an asynchronous event affecting the local segment occurs |
callbackArg | user-defined argument passed to the callback function |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT sci_segment_cb_reason_t SCIWaitForLocalSegmentEvent | ( | sci_local_segment_t | segment, |
unsigned int * | sourcenodeId, | ||
unsigned int * | localAdapterNo, | ||
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIWaitForLocalSegmentEvent() blocks a program until an event concerning the local segment has arrived.
If a timeout different from SCI_INFINITE_TIMEOUT is specified the function gives up when the timeout expires. SCIWaitForLocalSegmentEvent() cannot be used if a callback associated with the local segment is active (see SCICreateSegment()).
segment | handle to local segment descriptor |
sourcenodeId | identifier of the node that have generated the event |
localAdapterNo | number of the local adapter that receive the event |
timeout | time in milliseconds to wait before giving up |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIPrepareSegment | ( | sci_local_segment_t | segment, |
unsigned int | localAdapterNo, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIPrepareSegment() enables a local segment to be accessible from the specified network adapter.
segment | handle to the local segment descriptor |
localAdapterNo | Adapter number for which the segment is made available |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIRemoveSegment | ( | sci_local_segment_t | segment, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIRemoveSegment() frees the resources used by a local segment.
The physical memory is deallocated only if it was allocated when the segment was created with SCICreateSegment(). The function also destroys the descriptor associated with the local segment; after this call the handle to the descriptor becomes invalid and should not be used. SCIRemoveSegment() fails if other resources, either locally or remotely, depend on it. Before calling this function, the program should consider the use of SCISetSegmentUnavailable() with the flags NOTIFY or FORCE_DISCONNECT.
segment | handle to local segment descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT size_t SCIGetLocalSegmentSize | ( | sci_local_segment_t | segment | ) |
SCIGetLocalSegmentSize() returns the size in bytes of a local segment after it has been created with SCICreateSegment().
segment | handle to the local segment descriptor |
SISCI_API_EXPORT unsigned int SCIGetLocalSegmentId | ( | sci_local_segment_t | segment | ) |
Retrieve the segment identifier of a local segment created with SCICreateSegment().
segment | handle to the local segment descriptor |
SISCI_API_EXPORT void SCISetSegmentAvailable | ( | sci_local_segment_t | segment, |
unsigned int | localAdapterNo, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCISetSegmentAvailable() makes a local segment visible to remote nodes, that can then connect to it.
According to the state diagram shown in Figure 2.2 a local segment can be made available only after it has been prepared (see SCIPrepareSegment()).
segment | handle to local segment descriptor |
localAdapterNo | number of the local adapter where the local segment is made available for connections |
flags | not used. |
error | error information |
Error codes:
SISCI_API_EXPORT void SCISetSegmentUnavailable | ( | sci_local_segment_t | segment, |
unsigned int | localAdapterNo, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCISetSegmentUnavailable() hides an available segment to remote nodes; no new connections will be accepted on that segment.
If the flag SCI_FLAG_NOTIFY is specified, the operation is notified to the remote nodes connected to the local segment. The notification should be interpreted as an invitation to disconnect. If the flag SCI_FLAG_FORCE_DISCONNECT is specified, the remote nodes are forced to disconnect. These two flags can be used to implement a smooth removal of a local segment (see SCIRemoveSegment()).
segment | handle to the local segment descriptor |
localAdapterNo | number of the local adapter where the local segment was made available |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCICreateMapSequence | ( | sci_map_t | map, |
sci_sequence_t * | sequence, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCICreateMapSequence() creates and initializes a new sequence descriptor that can be used to check for errors occurring in a transfer of data from or to a mapped segment.
map | handle to a valid mapped segment descriptor |
sequence | handle to the new sequence descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIRemoveSequence | ( | sci_sequence_t | sequence, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIRemoveSequence() destroys a sequence descriptor.
After this call the handle to the descriptor becomes invalid and should not be used.
sequence | handle to the sequence descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT sci_sequence_status_t SCIStartSequence | ( | sci_sequence_t | sequence, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIStartSequence() performs the preliminary check of the error flags on the network adapter before starting a sequence of read and write operations on the concerned mapped segment.
Subsequent checks are done calling SCICheckSequence(), as far as no errors occur, in which case SCIStartSequence() shall be called again until it returns SCI_SEQ_OK. If the return value is SCI_SEQ_PENDING there is a pending error and the program is required to call SCIStartSequence() until it succeeds, before doing other transfer operations on the segment.
sequence | handle to the sequence descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT sci_sequence_status_t SCICheckSequence | ( | sci_sequence_t | sequence, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCICheckSequence() checks if any error has occurred in a data transfer controlled by a sequence since the last check.
The previous check can have been done by calling either SCIStartSequence(), that also initiates the sequence, or SCICheckSequence() itself. SCICheckSequence() can be invoked several times in a row without calling SCIStartSequence(), as far as it does not fail, returning SCI_SEQ_OK (i.e. there were no transmission errors in the sequence). If the return value is SCI_SEQ_RETRIABLE the operation can be immediately retried. A return value SCI_SEQ_NOT_RETRIABLE means that there have been a fatal error, probably also notified via callbacks to the corresponding mapped segment; it is not legal to execute other read or write operations on the segment until a call to SCIStartSequence() does not fail. As well, if the return value is SCI_SEQ_PENDING it is not legal to perform read or write operations on the segment until a call to SCIStartSequence() does not fail. The default behaviour of SCICheckSequence() is to flush any write buffers and to wait for all the outstanding write requests to be completed. To prevent this actions the caller has to use specific flags.
sequence | handle to a sequence descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIStoreBarrier | ( | sci_sequence_t | sequence, |
unsigned int | flags | ||
) |
SCIStoreBarrier() synchronizes all PIO accesses to a mapped segment.
When the function returns, all IO buffers have been flushed and all outstanding transactions related to the mapped segment have completed.
sequence | handle to the mapped segment descriptor |
flags | not used |
Error codes:
SISCI_API_EXPORT int SCIProbeNode | ( | sci_desc_t | sd, |
unsigned int | localAdapterNo, | ||
unsigned int | nodeId, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIProbeNode() checks if a remote node is reachable.
sd | handle to an open SISCI virtual device descriptor |
localAdapterNo | number of the local adapter used for the check |
nodeId | identifier of the remote node |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIAttachPhysicalMemory | ( | sci_ioaddr_t | ioaddress, |
void * | address, | ||
unsigned int | busNo, | ||
size_t | size, | ||
sci_local_segment_t | segment, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SISCI Privileged function
SCIAttachPhysicalMemory() enables usage of physical devices and memory regions where the Physical PCI/PCIe bus address ( and mapped CPU address ) are already known.
The function will register the physical memory as a SISCI segment which can be connected and mapped as a regular SISCI segment.
Requirements:
SCICreateSegment() with flag SCI_FLAG_EMPTY must have been called in advance
ioaddress | this is the address on the PCI bus that a PCI bus master has to use to write to the specified memory |
address | this is the (mapped) virtual address that the application has to use to access the device. This means that the device has to be mapped in advance by the devices own driver. If the device is not to be accessed by the local CPU, the address pointer should be set to NULL. |
busNo | bus number where the device is located. Only required for SPARC system. Should be set to 0 for all other systems |
size | size of the memory regions |
segment | buffer |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIQuery | ( | unsigned int | command, |
void * | data, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIQuery() provides an interface to request various information from the system, settings and interconnect status.
The information can be vendor dependent, but some requests are specified in the API and must be satisfied: the vendor identifier, the version of the API implemented, and some adapter characteristics. Each request defines its own data structure to be used as input and output to SCIQuery(). The memory management (allocation and deallocation) of the data structures has to be performed by the caller.
A query consist of a major-command and a sub-command.
command | type of information required |
data | generic data structure for possible sub-commands and output information |
flags | specified per command / sub-command below |
error | error information |
Commands
- SCI_Q_ADAPTER_SERIAL_NUMBER: Returns the serial number of the local adapter - SCI_Q_ADAPTER_CARD_TYPE: Returns the card type of local adapter. - SCI_Q_ADAPTER_NODEID: Returns the node id of local adapter. - SCI_Q_ADAPTER_LINK_OPERATIONAL: Returns true if the local link is operational. - SCI_Q_ADAPTER_CONFIGURED: Returns true if the local adapter is configured. - SCI_Q_ADAPTER_LINK_WIDTH: Returns the PCIe link width for the specified link port. - SCI_Q_ADAPTER_LINK_SPEED: Returns the PCIe link speed for the specified link port. - SCI_Q_ADAPTER_LINK_UPTIME: Returns the seconds of link uptime for the specified link port. - SCI_Q_ADAPTER_LINK_DOWNTIME: Returns the seconds of link downtime for the specified link port. - SCI_Q_ADAPTER_LINK_OPERATIONAL: Returns status for the specified link port. - SCI_Q_ADAPTER_LINK_CABLE_INSERTED: Returns if the cable is inserted for the specified link port. - SCI_Q_ADAPTER_LINK_ENABLED: Returns if the link is enabled for the specified link port. - SCI_Q_ADAPTER_LINK_PARTNER_PORT_NO: Returns the partner (remote) link port number for the specified link port. - SCI_Q_ADAPTER_NUMBER_OF_LINKS: Returns the number of adapter link ports that are enabled. - SCI_Q_ADAPTER_DMA_MTU: Returns the max transfer unit (MTU) of the DMA engine of the adapter. Flags: SCI_FLAG_DMA_SYSDMA - return the MTU of the system DMA. - SCI_Q_ADAPTER_MCAST_MAX_GROUPS: Returns the number of available multicast groups. - SCI_Q_ADAPTER_BDF: Returns the BDF of the adapter.
- SCI_Q_DMA_AVAILABLE: Returns whether the DMA mode specified in "flags" is available. - SCI_Q_DMA_CAPABILITIES: Returns the capabilities of the DMA mode specified in "flags". - Flags: SCI_FLAG_DMA_ADAPTER, SCI_FLAG_DMA_GLOBAL, SCI_FLAG_DMA_SYSDMA
- SCI_Q_LOCAL_SEGMENT_IOADDR: Returns the base I/O address of the local segment specified in the segment member, as seen by one of the local adapters it has been prepared on. If the segment has not been prepared on any adapters, this query returns 0. See also SCIMapLocalSegmentForDevice() - SCI_Q_LOCAL_SEGMENT_VIRTUAL_KERNEL_ADDR: Returns the local virtual kernel address of the local segment. This function has been deprecated and will always return 0. - SCI_Q_LOCAL_SEGMENT_PHYS_ADDR : Returns the local physical base address of the local segment specified in the segment member.
- SCI_Q_REMOTE_SEGMENT_IOADDR: Returns the local physical base address of the remote segment specified in the segment member. The remote segment must be mapped at least once before this query can be used. See also SCIGetMapPhysAddr().
Error codes:
SISCI_API_EXPORT void SCIGetLocalNodeId | ( | unsigned int | adapterNo, |
unsigned int * | nodeId, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Get local node id.
adapterNo | number of the local adapter to get node id |
nodeId | identifier of the local node |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIGetNodeIdByAdapterName | ( | char * | adaptername, |
dis_nodeId_list_t * | nodeId, | ||
dis_virt_adapter_t * | type, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
The function SCIGetNodeIByAdapterName() provides an interface to query the nodeId and adapter type for an adapter in the cluster specified by its name.
The local dishosts.conf file specifies the adapter name to nodeId map.
adaptername | name of the adapter to query node id |
nodeId | nodeId associated with the specified adapter name |
type | adapter type |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIGetNodeInfoByAdapterName | ( | char * | adaptername, |
unsigned int * | adapterNo, | ||
dis_nodeId_list_t * | nodeIdlist, | ||
dis_virt_adapter_t * | type, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Function description missing.
adaptername | names of the adapters to query node ids |
adapterNo | number of local adapter with the given adapter name |
nodeIdlist | |
type | |
flags | not used |
error | error information |
Error codes:
const SISCI_API_EXPORT char* SCIGetErrorString | ( | sci_error_t | error | ) |
Get error description from a SISCI error code.
SCIGetErrorString() was introduced in DIS release 5.5.0
error | SISCI error code |
SISCI_API_EXPORT void SCICreateDMAQueue | ( | sci_desc_t | sd, |
sci_dma_queue_t * | dq, | ||
unsigned int | localAdapterNo, | ||
unsigned int | maxEntries, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCICreateDMAQueue() allocates resources for a queue of DMA transfers and creates and initializes a descriptor for the new queue.
After the creation the state of the queue is IDLE (see sci_dma_queue_state_t). All the segments involved in the transfers included in the same DMA queue must use the same adapter, which is specified as a parameter in this function. If a handle to an existing queue is passed to this function it is overwritten with the handle to a new queue. The old queue is not affected but it may not be accessible any more.
sd | handle to an open SISCI virtual device descriptor |
dq | handle to the new DMA queue descriptor |
localAdapterNo | number of the adapter whose DMA engine will be used for the transfers |
maxEntries | maximum number of entries allowed in the DMA queue |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIRemoveDMAQueue | ( | sci_dma_queue_t | dq, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIRemoveDMAQueue() frees the resources allocated for a DMA queue and destroys the corresponding descriptor.
After this call the handle to the DMA queue descriptor becomes invalid and should not be used. As shown in the state diagram in Figure 2.4, this function can be called only if the queue is either in the initial (IDLE) or in a final (DONE, ERROR or ABORTED) state, otherwise the operation is illegal and the error is detected (see sci_dma_queue_state_t).
dq | handle to the DMA queue descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIAbortDMAQueue | ( | sci_dma_queue_t | dq, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIAbortDMAQueue() aborts a DMA transfer initiated with SCIStartDmaTransfer() or SCIStartDmaTransferVec().
Calling this function is really meaningful only if the queue is in the POSTED state. If the function is successful the final state is ABORTED (see sci_dma_queue_state_t). If the state is already ABORTED or if it is DONE or ERROR, the call is equivalent to a no-op. In all the other cases the call is illegal and the error is detected. There is a potential race condition if the call happens when the state is already changing from POSTED to either DONE or ERROR because the transfer has completed or an error has occurred. To check what happened the program should call SCIDMAQueueState().
dq | handle to the DMA queue descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT sci_dma_queue_state_t SCIDMAQueueState | ( | sci_dma_queue_t | dq | ) |
SCIDMAQueueState() returns the state of a DMA queue (see sci_dma_queue_state_t).
The call does not affect the state of the queue
dq | handle to the DMA queue descriptor |
Error codes:
SISCI_API_EXPORT sci_dma_queue_state_t SCIWaitForDMAQueue | ( | sci_dma_queue_t | dq, |
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIWaitForDMAQueue() blocks a program until a DMA queue has finished (because of the completion of all the transfers or due to an error) or the timeout has expired.
If timeout is SCI_INFINITE_TIMEOUT the function blocks until a relevant event arrives. The function returns the current state of the queue. According to the state diagram shown in Figure 2.4, calling this function is really meaningful only if the queue is in the POSTED state. If the state is in the ABORTED, DONE or ERROR states, the call is equivalent to a no-op. In all the other cases the call is illegal and the error is detected (see sci_dma_queue_state_t). SCIWaitForDMAQueue() cannot be used if a callback associated with the DMA queue is active.
dq | handle to a DMA queue descriptor |
timeout | timeout in milliseconds to wait before giving up |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCICreateInterrupt | ( | sci_desc_t | sd, |
sci_local_interrupt_t * | interrupt, | ||
unsigned int | localAdapterNo, | ||
unsigned int * | interruptNo, | ||
sci_cb_interrupt_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCICreateInterrupt() creates an interrupt resource and makes it available to remote nodes and initializes a descriptor for the interrupt.
An interrupt is associated by the driver with a unique number.
There is normally not a one to one relation between triggered and received interrupts. Several interrupts may be collapsed into one remote interrupt if interrupts are sent faster than the remote system can handle. The SISCI driver will ensure that at least one interrupt event is seen by the remote system, i.e. the callback will be invoked or SCIWaitForInterrupt() will wake up at least once, respectively.
If the flag SCI_FLAG_FIXED_INTNO is specified, the function tries to use the number passed by the caller.
sd | handle to an open SISCI virtual device descriptor |
interrupt | handle to the new interrupt descriptor |
localAdapterNo | number of the local adapter used to make the interrupt |
interruptNo | number assigned to the interrupt |
callback | function called when the interrupt is triggered |
callbackArg | user-defined parameter passed to the callback function |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIRemoveInterrupt | ( | sci_local_interrupt_t | interrupt, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIRemoveInterrupt() deallocates an interrupt resource and destroys the corresponding descriptor.
After this call the handle to the descriptor becomes invalid and should not be used.
interrupt | handle to the local interrupt descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIWaitForInterrupt | ( | sci_local_interrupt_t | interrupt, |
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIWaitForInterrupt() blocks a program until an interrupt is received.
If a timeout different from SCI_INFINITE_TIMEOUT is specified the function gives up when the timeout expires. SCIWaitForInterrupt() cannot be used if a callback associated with the interrupt is active (see SCICreateInterrupt()).
interrupt | handle to the local interrupt descriptor |
timeout | time in milliseconds to wait before giving up |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIConnectInterrupt | ( | sci_desc_t | sd, |
sci_remote_interrupt_t * | interrupt, | ||
unsigned int | nodeId, | ||
unsigned int | localAdapterNo, | ||
unsigned int | interruptNo, | ||
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIConnectInterrupt() connects the caller to an interrupt resource available on a remote node (see SCICreateInterrupt()).
The function creates and initializes a descriptor for the connected interrupt.
sd | handle to an open SISCI virtual device descriptor |
interrupt | handle to a new remote interrupt descriptor |
nodeId | identifier of the remote node where the interrupt has been created |
localAdapterNo | number of the local adapter used for the connection |
interruptNo | number assigned to the interrupt |
timeout | time in milliseconds to wait before giving up. Not implemented, should always be se to SCI_INFINITE_TIMEOUT |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIDisconnectInterrupt | ( | sci_remote_interrupt_t | interrupt, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIDisconnectInterrupt() disconnects an application from a remote interrupt resource and deallocates the corresponding descriptor.
After this call the handle to the descriptor becomes invalid and should not be used.
interrupt | handle to the remote interrupt descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCITriggerInterrupt | ( | sci_remote_interrupt_t | interrupt, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCITriggerInterrupt() triggers an interrupt on a remote node, after having connected to it with SCIConnectInterrupt().
What happens to the remote application that made the interrupt resource available depends on what it specified at the time it called SCICreateInterrupt().
interrupt | handle to the remote interrupt descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCICreateDataInterrupt | ( | sci_desc_t | sd, |
sci_local_data_interrupt_t * | interrupt, | ||
unsigned int | localAdapterNo, | ||
unsigned int * | interruptNo, | ||
sci_cb_data_interrupt_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCICreateDataInterrupt() creates a data interrupt resource and makes it available to remote nodes and initializes a descriptor for the interrupt.
A data interrupt is associated by the driver with a unique number. If the flag SCI_FLAG_FIXED_INTNO is specified, the function tries to use the number passed by the caller.
sd | handle to an open SISCI virtual device descriptor |
interrupt | handle to the new data interrupt descriptor |
localAdapterNo | number of the local adapter used to make the data interrupt |
interruptNo | number assigned to the data interrupt |
callback | function called when the data interrupt is triggered |
callbackArg | user-defined parameter passed to the callback function |
flags | see below |
error | error information |
Flags:
- SCI_ERR_OK \n Successful completion. - SCI_ERR_INTNO_USED \n This interrupt number is already used. - SCI_ERR_SYSTEM \n The callback thread could not be created.
SISCI_API_EXPORT void SCIRemoveDataInterrupt | ( | sci_local_data_interrupt_t | interrupt, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIRemoveDataInterrupt() deallocates a data interrupt resource and destroys the corresponding descriptor.
After this call the handle to the descriptor becomes invalid and should not be used.
interrupt | handle to the local data interrupt descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIWaitForDataInterrupt | ( | sci_local_data_interrupt_t | interrupt, |
void * | data, | ||
unsigned int * | length, | ||
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIWaitForDataInterrupt() blocks a program until a data interrupt is received.
If a timeout different from SCI_INFINITE_TIMEOUT is specified the function gives up when the timeout expires. SCIWaitForDataInterrupt() cannot be used if a callback associated with the data interrupt is active (see SCICreateInterrupt()).
interrupt | handle to the local data interrupt descriptor |
data | pointer to data buffer |
length | [in] length of data buffer; [out] actual data size received |
timeout | time in milliseconds to wait before giving up |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIConnectDataInterrupt | ( | sci_desc_t | sd, |
sci_remote_data_interrupt_t * | interrupt, | ||
unsigned int | nodeId, | ||
unsigned int | localAdapterNo, | ||
unsigned int | interruptNo, | ||
unsigned int | timeout, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIConnectDataInterrupt() connects the caller to a data interrupt resource available on a remote node (see SCICreateDataInterrupt()).
The function creates and initializes a descriptor for the connected data interrupt.
sd | handle to an open SISCI virtual device descriptor |
interrupt | handle to a new remote date interrupt descriptor |
nodeId | identifier of the remote node where the interrupt has been created |
localAdapterNo | number of the local adapter used for the connection |
interruptNo | number assigned to the interrupt |
timeout | time in milliseconds to wait before giving up. Not implemented, should always be set to SCI_INFINITE_TIMEOUT |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIDisconnectDataInterrupt | ( | sci_remote_data_interrupt_t | interrupt, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIDisconnectDataInterrupt() disconnects an application from a remote data interrupt resource and deallocates the corresponding descriptor.
After this call the handle to the descriptor becomes invalid and should not be used.
interrupt | handle to the remote data interrupt descriptor |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCITriggerDataInterrupt | ( | sci_remote_data_interrupt_t | interrupt, |
void * | data, | ||
unsigned int | length, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCITriggerDataInterrupt() sends an interrupt message to a remote node, after having connected to it with SCIConnectDataInterrupt().
What happens to the remote application that made the data interrupt resource available depends on what it specified at the time it called SCICreateDataInterrupt().
interrupt | handle to the remote data interrupt descriptor |
data | pointer to data buffer |
length | length of data |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIMemWrite | ( | void * | memAddr, |
volatile void * | remoteAddr, | ||
size_t | size, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIMemWrite() transfers efficiently a block of data from local memory to a mapped segment using the shared memory mode.
memAddr | base address in virtual memory of the source |
remoteAddr | offset inside the mapped segment where the transfer should start |
size | size of the transfer |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIMemCpy | ( | sci_sequence_t | sequence, |
void * | memAddr, | ||
sci_map_t | remoteMap, | ||
size_t | remoteOffset, | ||
size_t | size, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIMemCpy() transfers efficiently a block of data from local memory to a mapped segment using the shared memory mode.
If the flag SCI_FLAG_ERROR_CHECK is specified the function also checks if errors have occurred during the data transfer. If the flag SCI_FLAG_BLOCK_READ is specified, the transfer is from the mapped segment to the local memory.
sequence | handle to the sequence descriptor |
memAddr | base address in virtual memory of the source |
remoteMap | handle to the descriptor of the mapped segment that is the destination of the transfer |
remoteOffset | offset inside the mapped segment where the transfer should start |
size | size of the transfer |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIRegisterSegmentMemory | ( | void * | address, |
size_t | size, | ||
sci_local_segment_t | segment, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIRegisterSegmentMemory() associates an area memory allocated by the program (eg using malloc) with a local segment.
The segment must have been created passing the flag SCI_FLAG_EMPTY to SCICreateSegment(). The memory area is identified by its base address in virtual address space and its size. It is illegal to use the same local segment to register different memory areas. The function can try to determine if the specified address is legal or not, but this highly depends on the underlying platform.
SCIRegisterSegmentMemory() was implemented in DIS release 5.5.0 for Linux running on Intel systems.
Please note that this function requires the Input/Output Memory Management Unit (IOMMU, Intel VT-d) to be enabled in the BIOS and Linux booted with the IOMMU on (boot param intel_iommu=on). The exception to this requirement is that the associated segment is set to private (see SCICreateSegment()) or that the user-allocated memory is contiguous in physical memory (see Flags below).
The user-allocated memory must be 4-byte aligned as a minimum, but page alignment is recommended.
address | base address of the user-allocated memory in the programs virtual address space |
size | size of the user-allocated memory to be associated with the local segment |
segment | handle to local segment descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIAttachLocalSegment | ( | sci_desc_t | sd, |
sci_local_segment_t * | segment, | ||
unsigned int | segmentId, | ||
size_t * | size, | ||
sci_cb_local_segment_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIAttachLocalSegment() permits an application to "attach" to an already existing local segment, implying that two or more application want
share the same local segment.
The prerequisite, is that the
application which originally created the segment ("owner") has
preformed a SCIShareSegment() in order to mark the segment
"shareable".
To detach from an attached segment use the SCIRemoveSegment() call.
sd | handle to an open SISCI virtual device descriptor |
segment | handle to the new local segment descriptor |
segmentId | segment identifier |
size | segment size; if SCI_FLAG_BROADCAST is specified, size represents the multicast group size |
callback | callback function called when an asynchronous event affecting the local segment occurs |
callbackArg | user-defined argument passed to the callback function |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIShareSegment | ( | sci_local_segment_t | segment, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIShareSegment() permits other application to "attach" to an already existing local segment, implying that two or more application want share the same local segment.
The prerequisite, is that the application which originally created the segment ("owner") has preformed a SCIShareSegment() in order to mark the segment "shareable".
segment | handle to the descriptor of local segment. |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIFlush | ( | sci_sequence_t | sequence, |
unsigned int | flags | ||
) |
SCIFlush() flushes the CPU write combining buffers of the local system.
This function will make sure all data previously written to a remote segment, that may be residing in a local CPU cache etc, will be flushed out of the local system. The data may still be on its way through the interconnect when the function returns.
SCICheckSequence() should be used if the application wants to verify data has reached the destination memory.
sequence | handle to the sequence descriptor |
flags | see below |
Flags:
Error codes:
SISCI_API_EXPORT void SCIStartDmaTransfer | ( | sci_dma_queue_t | dq, |
sci_local_segment_t | localSegment, | ||
sci_remote_segment_t | remoteSegment, | ||
size_t | localOffset, | ||
size_t | size, | ||
size_t | remoteOffset, | ||
sci_cb_dma_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIStartDmaTransfer() starts the execution of a DMA queue.
The contents of the local segment if transferred into the remote segment using localOffset and remoteOffset. The local segment must be prepared before this function is called. The remote segment must be mapped with SCIMapRemoteSegment() prior to starting the transfer depending on the chosen DMA mode (see Flags below).
The function returns as soon as the transfer specifications contained in the queue are passed to the DMA engine. If a callback function is specified and explicitly activated using the flag SCI_FLAG_USE_CALLBACK, it is asynchronously invoked when all the transfers have completed or if an error occurs during a transfer. Alternatively, an application can block waiting for the queue completion calling SCIWaitForDMAQueue(). An application is allowed to start another transfer on a queue only after the previous transfer for that queue has completed.
Note that that DMA support and available modes may vary according to your specific adapter card and system. Please consult the technical specifications for more information.
dq | handle to the DMA queue descriptor |
localSegment | handle to the local segment descriptor |
remoteSegment | handle to the remote segment descriptor |
localOffset | base address inside the local segment where data reside (or where data are transferred to, if the transfer is from the remote segment to the local one) |
size | size of the data to be transferred |
remoteOffset | base address inside the remote segment where data are transferred to (or where data reside, if the transfer is from the remote segment to the local one) |
callback | callback function to be invoked when all the DMA transfers have completed or in case an error occurs during a transfer |
callbackArg | user-defined parameter passed to the callback function |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIStartDmaTransferMem | ( | sci_dma_queue_t | dq, |
void * | localAddress, | ||
sci_remote_segment_t | remoteSegment, | ||
size_t | size, | ||
size_t | remoteOffset, | ||
sci_cb_dma_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIStartDmaTransferMem starts the execution of a DMA queue based on a user-allocated memory buffer.
The contents of the buffer pointed to by localAddress is transferred into the remote segment using remoteOffset. The remote segment must be mapped with SCIMapRemoteSegment() prior to starting the transfer depending on the chosen DMA mode (see Flags below).
The function returns as soon as the transfer specifications contained in the queue are passed to the DMA engine. If a callback function is specified and explicitly activated using the flag SCI_FLAG_USE_CALLBACK, it is asynchronously invoked when all the transfers have completed or if an error occurs during a transfer. Alternatively, an application can block waiting for the queue completion calling SCIWaitForDMAQueue(). An application is allowed to start another transfer on a queue only after the previous transfer for that queue has completed.
Note that that DMA support and available modes may vary according to your specific adapter card and system. Please consult the technical specifications for more information.
SCIStartDmaTransferMem() was introduced in DIS release 5.5.0 for Linux and Windows.
dq | handle to the DMA queue descriptor |
localAddress | pointer to a user-allocated memory buffer |
remoteSegment | handle to the remote segment descriptor |
size | size of the data to be transferred |
remoteOffset | base address inside the remote segment where data are transferred to (or where data reside, if the transfer is from the remote segment to the local one) |
callback | callback function to be invoked when all the DMA transfers have completed or in case an error occurs during a transfer |
callbackArg | user-defined parameter passed to the callback function |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIStartDmaTransferVec | ( | sci_dma_queue_t | dq, |
sci_local_segment_t | localSegment, | ||
sci_remote_segment_t | remoteSegment, | ||
size_t | vecLength, | ||
dis_dma_vec_t * | disDmaVec, | ||
sci_cb_dma_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIStartDmaTransferVec() starts the execution of a DMA queue.
The contents of the local segment if transferred into the remote segment using the offsets in the vector. Each vector element contains a size, local and remote offset. The local segment must be prepared before this function is called. The remote segment must be mapped with SCIMapRemoteSegment() prior to starting the transfer depending on the chosen DMA mode (see Flags below).
The function returns as soon as the transfer specifications contained in the queue are passed to the DMA engine. If a callback function is specified and explicitly activated using the flag SCI_FLAG_USE_CALLBACK, it is asynchronously invoked when all the transfers have completed or if an error occurs during a transfer. Alternatively, an application can block waiting for the queue completion calling SCIWaitForDMAQueue(). An application is allowed to start another transfer on a queue only after the previous transfer for that queue has completed.
Note that that DMA support and available modes may vary according to your specific adapter card and system. Please consult the technical specifications for more information.
dq | handle to the DMA queue descriptor |
localSegment | handle to the local segment descriptor |
remoteSegment | handle to the remote segment descriptor |
vecLength | length of the DMA vector queue. |
disDmaVec | handle to the DMA vector queue. |
callback | callback function to be invoked when all the DMA transfers have completed or in case an error occurs during a transfer |
callbackArg | user-defined parameter passed to the callback function |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIRequestDMAChannel | ( | sci_desc_t | sd, |
sci_dma_channel_t * | channel, | ||
unsigned int | localAdapterNo, | ||
sci_dma_type_t | type, | ||
unsigned int | channelId, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
NOTE: This function is not yet finalized and may change without notice!
SCIRequestDMAChannel() lets applications request a single DMA channel of a specific type. The resulting channel can subsequently be used with SCIAssignDMAChannel() to specify that DMA transfers on a given DMA queue should use the channel. Channels can be requested as exclusive (default) or shared. The former limits the number of concurrent channel users to one.
Note that that DMA support and available modes may vary according to your specific adapter card and system. Please consult the technical specifications for more information.
Introduced in DIS release 5.16.0
sd | handle to an open SISCI descriptor |
channel | handle to the new DMA channel descriptor |
localAdapterNo | number of the local adapter that provides the DMA channel, or the adapter that should be associated with the system DMA channel |
type | The desired channel type Valid types are:
|
channelId | Channel identifier Used by applications to share specific DMA channels Should be set to SCI_DMA_CHANNEL_ID_DONTCARE when the above is not applicable |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIReturnDMAChannel | ( | sci_dma_channel_t | channel, |
sci_error_t * | error | ||
) |
NOTE: This function is not yet finalized and may change without notice!
Returns a DMA channel allocated with SCIRequestDMAChannel(). If the channel was requested as exclusive, it will made available to other users again.
Introduced in DIS release 5.16.0.
channel | handle to the DMA channel |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIAssignDMAChannel | ( | sci_dma_channel_t | channel, |
sci_dma_queue_t | dq, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
NOTE: This function is not yet finalized and may change without notice!
Assigns a DMA channel (see SCIRequestDMAChannel()) to a DMA queue, signalling that subsequent transfers on the queue should use this channel.
Introduced in DIS release 5.16.0.
channel | handle to a DMA channel descriptor |
dq | handle to the DMA queue descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT sci_dma_type_t SCIGetDMAChannelType | ( | sci_dma_channel_t | channel | ) |
SCIGetDMAChannelType() returns the type of a DMA channel requested through SCIRequestDMAChannel().
channel | valid handle to a DMA channel |
SISCI_API_EXPORT void SCIPrepareLocalSegmentForDMA | ( | sci_dma_channel_t | channel, |
sci_local_segment_t | local_segment, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
NOTE: This function is not yet finalized and may change without notice!
SCIPrepareLocalSegmentForDMA() enables a local segment to be accessible from the specified DMA channel (see SCIRequestDMAChannel()).
Note that currently this function is only applicable to System DMA channels when the Input/Output Memory Management Unit (IOMMU, Intel VT-d) is enabled.
Introduced in DIS release 5.16.0 for Intel systems running Linux.
channel | handle to the DMA channel that the segment should be prepared for |
local_segment | handle to a local segment descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIUnprepareLocalSegmentForDMA | ( | sci_dma_channel_t | channel, |
sci_local_segment_t | local_segment, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
NOTE: This function is not yet finalized and may change without notice!
SCIUnprepareLocalSegmentForDMA() makes a local segment previously prepared with SCIPrepareLocalSegmentForDMA() unaccessible to the specified DMA channel
Note that currently this function is only applicable to System DMA channels when the Input/Output Memory Management Unit (IOMMU, Intel VT-d) is enabled.
Introduced in DIS release 5.16.0 for Intel systems running Linux.
channel | handle to the DMA channel that the segment was previously prepared for |
local_segment | handle to a local segment descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIPrepareRemoteSegmentForDMA | ( | sci_dma_channel_t | channel, |
sci_remote_segment_t | remote_segment, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
NOTE: This function is not yet finalized and may change without notice!
SCIPrepareRemoteSegmentForDMA() enables a remote segment to be accessible from the specified DMA channel (see SCIRequestDMAChannel()). The remote segment must be mapped prior to calling this function (see SCIMapRemoteSegment()).
Note that currently this function is only applicable to System DMA channels when the Input/Output Memory Management Unit (IOMMU, Intel VT-d) is enabled.
Introduced in DIS release 5.16.0 for Intel systems running Linux.
channel | handle to the DMA channel that the segment should be prepared for |
remote_segment | handle to a remote segment descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIUnprepareRemoteSegmentForDMA | ( | sci_dma_channel_t | channel, |
sci_remote_segment_t | remote_segment, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
NOTE: This function is not yet finalized and may change without notice!
SCIUnprepareRemoteSegmentForDMA() makes a remote segment previously prepared with SCIPrepareRemoteSegmentForDMA() unaccessible to the specified DMA channel
Note that currently this function is only applicable to System DMA channels when the Input/Output Memory Management Unit (IOMMU, Intel VT-d) is enabled.
Introduced in DIS release 5.16.0 for Intel systems running Linux.
channel | handle to the DMA channel that the segment was previously prepared for |
remote_segment | handle to a remote segment descriptor |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCICacheSync | ( | sci_map_t | map, |
void * | addr, | ||
size_t | length, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCICacheSync() is used to control the CPU cache.
This function is only needed on platforms where the hardware does NOT provide a coherent IO (cache) system. This function is currently only needed for the Tegra K1 and X1. Users of all other platforms can ignore this function.
Platforms without IO cache coherency requires special care when IO devices and the CPU is operating on the same region in memory. This applies to local segments that are exported or used for DMA.
On cache incoherent platforms, writes by the CPU to local segments may not be visible by remote nodes and DMA until the CPU cache is flushed. To avoid remote nodes seeing stale data, programs may call SCICacheSync with the SCI_FLAG_CACHE_FLUSH flag. In the reverse direction, the CPU may not see changes by a remote node, or DMA engine until the CPU has invalidated its CPU cache. Programs may invalidate the CPU cache by calling SCICacheSync with the SCI_FLAG_CACHE_INVALIDATE flag.
The function will always sync at least the range specified, but may operate on bytes preceding and following if the address and/or length is not aligned to the CPU cache line size.
The function is available and can be called on all platforms but will immediately return with no side effects unless used on a system where the CPU cache must be managed.
map | The local map handle. |
addr | The virtual address pointing to the first byte to be synced. This address will be aligned down to the nearest CPU cache line. |
length | The number of bytes to be synced. Will be rounded up to the CPU cache line size. |
flags | Controls the cache operation. Both FLUSH and INVALIDATE may be given at the same time as a logical OR of the flags. In this case the range will first be flushed and then invalidated. Some platforms may not support all combinations. |
error | Error information. |
Flags:
Error codes:
SISCI_API_EXPORT void SCIRegisterPCIeRequester | ( | sci_desc_t | sd, |
unsigned int | localAdapterNo, | ||
unsigned int | bus, | ||
unsigned int | devfn, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIRegisterPCIeRequester() registers a local PCIe requester with the NT function so that it can send traffic through the NTB.
This function must be called for each device.
The corresponding SCIUnregisterPCIeRequester() should be called before the application terminates.
Please note that registration and de-registration of PCIe devices are automatically done if you are using the SISCI SmartIO functions. Do not use this function in combination with SISCI SmartIO.
sd | Handle to an open SISCI virtual device descriptor. |
localAdapterNo | Number of the local adapter used for the check. |
bus | Bus number of the device. |
devfn | Device and function number of the device. |
flags | See below. |
error | Error information. |
Flags:
Error codes:
SISCI_API_EXPORT void SCIUnregisterPCIeRequester | ( | sci_desc_t | sd, |
unsigned int | localAdapterNo, | ||
unsigned int | bus, | ||
unsigned int | devfn, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
SCIUnregisterPCIeRequester() unregisters a local PCIe requester from the NT function.
The PCIe requester must previously have been registered using the SCIRegisterPCIeRequester() function.
sd | Handle to an open SISCI virtual device descriptor. |
localAdapterNo | Number of the local adapter used for the check. |
bus | Bus number of the device. |
devfn | Device and function number of the device. |
flags | Not used. |
error | Error information. |
Error codes:
SISCI_API_EXPORT void SCIBorrowDevice | ( | sci_desc_t | sd, |
sci_smartio_device_t * | device, | ||
unsigned long long | fdid, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Borrows a SmartIO device.
By default, multiple programs can access the device simultaneously. It's the users responsibility to synchronize access between multiple users.
When done, the device must be returned by using SCIReturnDevice()
Introduced in DIS release 5.5.0.
sd | handle to an open SISCI virtual device descriptor |
device | handle to the new borrowed device descriptor |
fdid | fabric device identifier of the device to be borrowed |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT void SCIReturnDevice | ( | sci_smartio_device_t | device, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Undo SCIBorrowDevice by releasing the borrowed device.
Any resouces (segments, interrupts, etc) assosiated with the device should be released before returning the device.
Introduced in DIS release 5.5.0.
device | handle to the descriptor of the device that is being returned |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIReleaseExclusiveBorrow | ( | sci_smartio_device_t | device, |
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Release the exclusive lock on a borrowed device, allowing others to use the device concurrently.
Notes:
Introduced in DIS release 5.11.0.
device | handle to the descriptor of the device that is currently being borrowed exclusively |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIConnectDeviceSegment | ( | sci_smartio_device_t | device, |
sci_remote_segment_t * | segment, | ||
unsigned int | segmentId, | ||
unsigned int | segmentType, | ||
sci_cb_device_segment_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Connects an application to a device memory segment.
There are three different types of device memory segments that can be connected to: BAR, private and shared. The type is specified with the type parameter. This function will connect to such segments for a borrowed device (See SCIBorrowDevice()). These segments must be connected to with this function, but are otherwise identical other remote segments. The behaviour of this function is identical to SCIConnectSegment() with the exception of the function parameters and any notes, flags or error codes documented here.
Notes:
Introduced in DIS release 5.5.0.
device | handle to the device that the segment is associated with |
segment | handle to the new connected segment descriptor |
segmentId | number of the segment of the given type that should be connected to |
segmentType | segment memory type (see below) |
callback | function called when an asynchronous event affecting the segment occurs |
callbackArg | user-defined parameter passed to the callback function |
flags | See flags below and flags for SCIConnectSegment() |
error | See below and error codes for SCIConnectSegment() |
Memory type:
Flags:
Error codes:
SISCI_API_EXPORT void SCIConnectDeviceSegmentPath | ( | sci_smartio_device_t | device, |
sci_remote_segment_t * | segment, | ||
unsigned int | nodeId, | ||
unsigned int | segmentId, | ||
unsigned int | segmentType, | ||
unsigned int | localAdapterNo, | ||
sci_cb_device_segment_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
This function is identical to SCIConnectDeviceSegment(), except the path (local adapter and node ID) is specified manually.
Notes:
Introduced in DIS release 5.5.0.
device | handle to the device that the segment is associated with |
segment | handle to the new connected segment descriptor |
nodeId | identifier of the node where the segment is allocated |
segmentId | number of the segment of the given type that should be connected to |
segmentType | segment memory type (see below) |
localAdapterNo | number of the local adapter through which the device segment can be reached |
callback | function called when an asynchronous event affecting the segment occurs. |
callbackArg | user-defined parameter passed to the callback function |
flags | See flags below and flags for SCIConnectSegment() |
error | See below and error codes for SCIConnectSegment() |
Memory type:
Flags:
Error codes:
SISCI_API_EXPORT void SCICreateDeviceSegment | ( | sci_smartio_device_t | device, |
unsigned int | segmentId, | ||
size_t | size, | ||
unsigned int | type, | ||
unsigned int | accessHints, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Creates a memory segment and associates it with a device.
There are only two possible types of device memory segments: private and shared. The type is specified with the type parameter. Shared segments are available to all nodes, while private segments are only available to the local application.
This function will create such segments for a borrowed device (see SCIBorrowDevice()). Segments must be connected to using SCIConnectDeviceSegment() afterwards in order to obtain a segment handle, but are otherwise identical other remote segments.
The location of device memory segments will be determined through access pattern hint indicators, which can be used in different combinations.
More specific indications will aid the implementation in choosing the most appropriate segment location. See below for a full description.
Notes:
Introduced in DIS release 5.11.0.
device | handle to the device that the segment is to be associated with |
segmentId | identifier of the segment to create and connect to |
size | segment size |
type | segment memory type (see below) |
accessHints | indicate access pattern (see below) |
flags | see flags below and flags for SCIConnectSegment() |
error | see below and error codes for SCIConnectSegment() |
Memory types:
Memory access pattern indicators:
Flags:
Error codes:
SISCI_API_EXPORT void SCIMapLocalSegmentForDevice | ( | sci_local_segment_t | segment, |
unsigned int | localAdapterNo, | ||
sci_smartio_device_t | device, | ||
sci_ioaddr_t * | remoteAddr, | ||
size_t | offset, | ||
size_t | size, | ||
sci_cb_device_mapping_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Sets up access to a local segment for device that is being borrowed from a remote node, allowing the device to DMA to the segment using remoteAddr.
Semantically similar to the device performing SCIConnectSegment() and SCIMapRemoteSegment(). Aftes successful completion, the device can access the segment using the address in remoteAddr.
Notes:
Introduced in DIS release 5.5.0.
segment | handle to the local segment descriptor |
localAdapterNo | number of the local adapter through which the local segment can be mapped |
device | handle to the descriptor of the device that the segment should be mapped for. |
remoteAddr | resulting remote address that device can access segment through |
offset | offset into the remote segment mapping should begin. |
size | size of the area of the remote segment to be mapped, starting from offset. |
callback | not implemented. |
callbackArg | not implemented. |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIUnmapLocalSegmentForDevice | ( | sci_local_segment_t | segment, |
unsigned int | localAdapterNo, | ||
sci_smartio_device_t | device, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Undo SCIMapLocalSegmentForDevice().
Semantically similar to the device performing SCIUnmapSegment() and SCIDisconnectSegment().
Introduced in DIS release 5.5.0.
segment | handle to the local segment descriptor |
localAdapterNo | number of the local adapter through which the local segment has been mapped |
device | handle to the descriptor of the device that the segment should be mapped for. |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIMapRemoteSegmentForDevice | ( | sci_remote_segment_t | segment, |
sci_smartio_device_t | device, | ||
sci_ioaddr_t * | remoteAddr, | ||
size_t | offset, | ||
size_t | size, | ||
sci_cb_device_mapping_t | callback, | ||
void * | callbackArg, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Sets up access to a remote segment for device that is being borrowed from a remote node, allowing the device to DMA to the segment using remoteAddr.
Semantically similar to the device performing SCIConnectSegment() and SCIMapRemoteSegment(). Aftes successful completion, the device can access the segment using the address in remoteAddr.
Notes:
Introduced in DIS release 5.5.0.
segment | handle to the remote segment descriptor |
device | handle to the descriptor of the device that the segment should be mapped for. |
remoteAddr | resulting remote address that device can access segment through |
offset | offset into the remote segment mapping should begin. |
size | size of the area of the remote segment to be mapped, starting from offset. |
callback | not implemented. |
callbackArg | not implemented. |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT void SCIUnmapRemoteSegmentForDevice | ( | sci_remote_segment_t | segment, |
sci_smartio_device_t | device, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Undo SCIMapRemoteSegmentForDevice().
Semantically similar to the device performing SCIUnmapSegment() and SCIDisconnectSegment().
Introduced in DIS release 5.5.0.
segment | handle to the local segment descriptor |
device | handle to the descriptor of the device that the segment should be mapped for. |
flags | not used |
error | error information |
Error codes:
SISCI_API_EXPORT size_t SCIGetDeviceList | ( | sci_desc_t | sd, |
unsigned long long * | fdids, | ||
size_t | length, | ||
const sci_smartio_device_info_t * | filter, | ||
unsigned int | flags, | ||
sci_error_t * | error | ||
) |
Retrieve a list of fabric device identifiers of SmartIO devices discovered by the local node.
The user can also specify devices of interest by supplying device information struct specifying fields that must be matched. The filter argument may be NULL, in which case all discovered devices will be returned.
Examples of fields to filter on: pci_vendor_id, pci_device_id, pci_class_id, pci_serial_number, ...
Introduced in DIS release 5.11.0
Notes:
sd | handle to an open SISCI virtual device descriptor |
fdids | pointer to an array of fabric device identifiers, at least length long |
length | the length of the fdids array |
filter | used to filter devices of interest (can be NULL) |
flags | see below |
error | error information |
Flags:
Error codes:
SISCI_API_EXPORT unsigned long long SCIGetFabricDeviceId | ( | sci_smartio_device_t | device | ) |
Get fabric device identifier of SmartIO device.
Introduced in DIS release 5.11.0
device | device handle descriptor |
const SISCI_API_EXPORT unsigned int SCI_FLAG_BROADCAST |
Enable Multicast.
const SISCI_API_EXPORT unsigned int SCI_FLAG_LOCK_USER_MEM |
Pin user memory.