Definition of the driver interface. More...
Go to the source code of this file.
Data Structures | |
struct | nm_drv_profile_s |
Performance information for driver. More... | |
struct | nm_minidriver_capabilities_s |
Static driver capabilities. More... | |
struct | nm_minidriver_hints_s |
some hints to help drivers tune themselves More... | |
struct | nm_minidriver_properties_s |
struct | nm_minidriver_iface_s |
Interface driver for the 'NewMad_minidriver' component interface. More... | |
struct | nm_prefetch_key_s |
key to match prefetch entries with actual send_iov_post More... | |
Functions | |
PUK_IFACE_TYPE (NewMad_minidriver, struct nm_minidriver_iface_s) | |
static int | nm_prefetch_key_eq (const struct nm_prefetch_key_s *p_key1, const struct nm_prefetch_key_s *p_key2) |
static uint32_t | nm_prefetch_key_hash (const struct nm_prefetch_key_s *p_key) |
Definition of the driver interface.
A driver with a context corresponds to a NIC. The same driver may be used in multiple contexts in case of multi-rail. An instance is created for each gate.
A driver must define a subset of functions of struct nm_minidriver_iface_s. ** Init **
** Connection establishment ** A driver must define at least one method for connection establishment among synchronous or asynchronous.
** Sending ** 3 methods are available to initiate a send operation: buffer-based, iov-based, data-based. 2 methods are available to manage completion: polling and blocking wait. A driver must provide at least one method to initiate a send, must provide polling, and may optionnaly provide blocking wait.
** Receiving ** 3 methods are available to initiate a recv operation: buffer-based, iov-base, data-based. 2 methods are available to manage completion: polling and blocking wait. A driver must provide at least one method to initiate a recv, must provide polling, and may optionnaly provide blocking wait. For scalability, before posting a recv request on a given instance, it is possible to ask globally (context-wide) for which instance has data available for receive. This may be done in a non-blocking way with recv_probe_any() or blocking with recv_wait_any(). After one if these functions returns, it is guaranteed that posting a receive on the returned instance will succeed immediately. This mechanism is reserved to drivers for small packet, without rendez-vous.
** Prefetching **
To optimize transfer on networks that require memory registration, it is possible to allow speculative registration on the sender or receiver side while a rendez-vous is still in progress. The user calls send_iov_prefetch() when it is likely that the message will be accepted on the given network, before having received the RTR, and recv_iov_prefetch() when it is likely that the message will be arriving through the given network, before having received rendez-vous request. In case the data arrives through another network or with a different layout (multiple chunks), functions send_iov_unfetch() and recv_iov_unfetch() are called to cancel prefetch. The driver may match calls to send_iov_prefetch() with the corresponding send_iov_post() through the iovec.
** Rendez-vous data ** The driver may want to piggy-back some data with the RTR messages. In this case, the user calls get_rdv_data() on the receiver side after the receive has been posted, transports this data allongside with the RTR, and gives it to the driver on the sender side by calling set_rdv_data(). This may be usefull to driver implementors to transfer memory registration information or addresses for RDMA.
Definition in file nm_minidriver.h.
|
inlinestatic |
Definition at line 302 of file nm_minidriver.h.
References nm_prefetch_key_s::n, and nm_prefetch_key_s::v.
|
inlinestatic |
Definition at line 309 of file nm_minidriver.h.
References nm_prefetch_key_s::v.
PUK_IFACE_TYPE | ( | NewMad_minidriver | , |
struct nm_minidriver_iface_s | |||
) |