Motr  M0
LNet Transport Core API

API Overview

The LNet Transport Core presents an address space agnostic API to the LNet Transport layer. These interfaces are declared in the file net/lnet/lnet_core.h.

The interface is implemented differently in the kernel and in user space. The kernel interface interacts directly with LNet; the user space interface uses a device driver to communicate with its kernel counterpart and uses shared memory to avoid event data copy.

The Core API offers no callback mechanism. Instead, the transport must poll for events. Typically this is done on one or more dedicated threads, which exhibit the desired processor affiliation required by the higher software layers.

The following sequence diagram illustrates the typical operational flow:

msc_inline_mscgraph_9

API Data Structures

The API requires that the transport application maintain API defined shared data for various network related objects:

The sharing takes place between the transport layer and the core layer. This will span the kernel and user address space boundary when using the user space transport.

These shared data structures should be embedded in the transport application's own private data. This requirement results in an initialization call pattern that takes a pointer to the standard network layer data structure concerned and a pointer to the API's data structure.

Subsequent calls to the API only pass the API data structure pointer. The API data structure must be eventually finalized.

Subroutines

The API subroutines are described in LNet Transport Core Interfaces. The subroutines are categorized as follows:

Invocation of the buffer operation initiation subroutines and the nlx_core_buf_event_get() subroutine should be serialized.

See also
LNet Transport Kernel Core DLD
LNet Transport User Space Core DLD
LNet Transport Device DLD