nm_minidriver.h
Go to the documentation of this file.
247 };
379 int (*send_pkt_buf_get)(void*_status, struct nm_pkt_s*p_pkt) __attribute__ ((warn_unused_result));
418 int (*recv_pkt_buf_release)(void*_status, struct nm_pkt_s*p_pkt) __attribute__ ((warn_unused_result));
430 int (*recv_pkt_cancel)(void*_status, struct nm_pkt_s*p_pkt) __attribute__ ((warn_unused_result));
439 int (*recv_probe_any)(puk_context_t p_context, void**_status) __attribute__ ((warn_unused_result));
445 int (*recv_wait_any)(puk_context_t p_context, void**_status) __attribute__ ((warn_unused_result));
High-level data manipulation through iterators.
assert(p_data->ops.p_traversal !=NULL)
@ nm_minidriver_reentrance_trk_dir
no concurrent calls for a track except between send/recv
Definition nm_minidriver.h:242
@ nm_minidriver_reentrance_drv_dir
no concurrent calls for the driver except between send/recv directions
Definition nm_minidriver.h:245
@ nm_minidriver_reentrance_hybrid
no concurrent calls for a track on sender-side, no concurrent calls for the driver on receiver-side
Definition nm_minidriver.h:244
@ nm_minidriver_reentrance_drv
no concurrent calls at all for the full driver
Definition nm_minidriver.h:246
@ nm_minidriver_reentrance_pkt
no concurrent calls for a given pkt (default)
Definition nm_minidriver.h:241
@ nm_minidriver_reentrance_trk
no concurrent calls for a track (driver instance)
Definition nm_minidriver.h:243
PUK_IFACE_TYPE(NewMad_minidriver, struct nm_minidriver_iface_s)
static void nm_minidriver_properties_init(struct nm_minidriver_properties_s *p_props)
initialize all properties to 0
Definition nm_minidriver.h:468
static void nm_minidriver_properties_normalize(struct nm_minidriver_properties_s *p_props)
ensure properties are in canonical form
Definition nm_minidriver.h:473
This is the common public header for NewMad.
enum nm_trk_kind_e nm_trk_kind_t
a data descriptor, used to pack/unpack data from app layout to/from contiguous buffers
Definition nm_data.h:200
enum nm_minidriver_reentrance_e reentrance
reentrance model this driver complies with
Definition nm_minidriver.h:275
int max_pkt_recvs
maximum number of concurrent receives; if 0, 1 is assumed
Definition nm_minidriver.h:270
bool supports_iovec
driver can send iovecs; if set to 0 and send_iov_post is non-NULL, then driver supports only iov coun...
Definition nm_minidriver.h:265
int max_pkt_sends
maximum number of concurrent sends; if 0, 1 is assumed
Definition nm_minidriver.h:269
bool trk_rdv
trk needs a rdv for matched send/recv size; if 0, trk preserves boundaries
Definition nm_minidriver.h:272
bool supports_recv_wait
drivers support blocking wait for a single receive
Definition nm_minidriver.h:261
bool supports_recv_any
driver accepts receive from any source (recv_probe_any)
Definition nm_minidriver.h:259
Interface driver for the 'NewMad_minidriver' component interface.
Definition nm_minidriver.h:352
void(* connect_wait)(void *_status)
wait for a previously posted connect_async to complete
Definition nm_minidriver.h:367
int(* recv_wait_any)(puk_context_t p_context, void **_status) __attribute__((warn_unused_result))
passively wait for a pending recv from any source; return status of instance
Definition nm_minidriver.h:445
int(* recv_pkt_wait)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
wait for completion of a recv operation already posted
Definition nm_minidriver.h:424
void(* send_pkt_prefetch)(void *_status, struct nm_pkt_s *p_pkt)
prefetch data in driver buffers before send_pkt_post; calling it is optional
Definition nm_minidriver.h:456
int(* recv_pkt_buf_release)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
release a buffer for buffer-based receive.
Definition nm_minidriver.h:418
void(* init)(puk_context_t context, const void **drv_url, size_t *url_size)
init the driver and get its url
Definition nm_minidriver.h:358
int(* recv_pkt_cancel)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
cancel a posted recv
Definition nm_minidriver.h:430
int(* recv_cancel_any)(puk_context_t p_context) __attribute__((warn_unused_result))
cancel a recv_wait_any
Definition nm_minidriver.h:451
int(* send_pkt_wait)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
wait for completion of a send operation already posted
Definition nm_minidriver.h:394
int(* recv_probe_any)(puk_context_t p_context, void **_status) __attribute__((warn_unused_result))
poll the driver for a pending recv from any source; returns status of instance
Definition nm_minidriver.h:439
void(* recv_pkt_unfetch)(puk_context_t p_context, struct nm_pkt_s *p_pkt)
cancel a prefetch recv; a prefetch is assupmed to always be followed either by 'recv' or 'unfetch'
Definition nm_minidriver.h:462
void(* getprops)(puk_context_t context, struct nm_minidriver_properties_s *props)
get driver properties (profiling and capabilities)
Definition nm_minidriver.h:356
void(* send_pkt_unfetch)(void *_status, struct nm_pkt_s *p_pkt)
cancel a prefetch; a prefetch is assumed to always be followed by either 'send' or 'unfetch'
Definition nm_minidriver.h:458
int(* recv_pkt_post)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
post a pkt recv
Definition nm_minidriver.h:404
void(* recv_pkt_prefetch)(puk_context_t p_context, struct nm_pkt_s *p_pkt)
prefetch recv, i.e.
Definition nm_minidriver.h:460
int(* send_pkt_buf_get)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
get a buffer from the driver for sending;
Definition nm_minidriver.h:379
void(* connect_async)(void *_status, const void *remote_url, size_t url_size)
asynchronously start the connect process
Definition nm_minidriver.h:365
int(* send_pkt_poll)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
poll a send operation already posted;
Definition nm_minidriver.h:392
int(* recv_pkt_poll)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
poll a recv operation already posted.
Definition nm_minidriver.h:415
int(* send_pkt_post)(void *_status, struct nm_pkt_s *p_pkt) __attribute__((warn_unused_result))
post a send request for data described in pkt;
Definition nm_minidriver.h:385
struct nm_minidriver_capabilities_s capabilities
Definition nm_minidriver.h:287
const char * nickname
user-friendly name to display when user asks which drivers are used
Definition nm_minidriver.h:289
struct nm_pkt_s::@33 flags
struct nm_pkt_s::@32 recv_prefetch
void * p_content
content of rdv_data; remains allocated until pkt completion
Definition nm_minidriver.h:321
struct nm_pkt_s::@31 send_prefetch
struct nm_data_properties_s chunk_props
pre-computed properties for the chunk of data
Definition nm_minidriver.h:316
struct nm_pkt_s::@30 driver_data
to be used by the driver itself, to save status accross calls
struct nm_pkt_s::@29 rdv_data
rdv data, filled by receiver, read by sender, if needed