Motr
M0
|
![]() |
Data Structures | |
struct | nlx_kcore_interceptable_subs |
struct | nlx_kcore_domain |
struct | nlx_kcore_transfer_mc |
struct | nlx_kcore_buffer |
struct | nlx_kcore_buffer_event |
struct | nlx_kcore_ops |
Macros | |
#define | NLX_kcore_LNetMDAttach(ktm, lcbuf, kb, umd) (*nlx_kcore_iv._nlx_kcore_LNetMDAttach)(ktm, lcbuf, kb, umd) |
#define | NLX_kcore_LNetPut(ktm, lcbuf, kb, umd) (*nlx_kcore_iv._nlx_kcore_LNetPut)(ktm, lcbuf, kb, umd) |
#define | NLX_kcore_LNetGet(ktm, lcbuf, kb, umd) (*nlx_kcore_iv._nlx_kcore_LNetGet)(ktm, lcbuf, kb, umd) |
#define | LNetHandleIsEqual(h1, h2) ((h1).cookie == (h2).cookie) |
#define | LNetHandleIsInvalid(h) ((h).cookie == LNET_WIRE_HANDLE_COOKIE_NONE) |
#define | NLX_PAGE_OFFSET(addr) ((addr) & ~PAGE_MASK) |
Typedefs | |
typedef int(* | nlx_kcore_queue_op_t) (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb) |
Enumerations | |
enum | { M0_NET_LNET_MAX_PORTALS = 64, M0_NET_LNET_EQ_SIZE = 0, M0_NET_LNET_PORTAL_MASK = M0_NET_LNET_BUFFER_ID_MAX } |
Variables | |
static struct m0_mutex | nlx_kcore_mutex |
static struct m0_tl | nlx_kcore_tms |
static struct nlx_kcore_interceptable_subs | nlx_kcore_iv |
static struct nlx_kcore_ops | nlx_kcore_def_ops |
#define LNetHandleIsEqual | ( | h1, | |
h2 | |||
) | ((h1).cookie == (h2).cookie) |
Definition at line 246 of file klnet_core.h.
#define LNetHandleIsInvalid | ( | h | ) | ((h).cookie == LNET_WIRE_HANDLE_COOKIE_NONE) |
Definition at line 247 of file klnet_core.h.
#define NLX_kcore_LNetGet | ( | ktm, | |
lcbuf, | |||
kb, | |||
umd | |||
) | (*nlx_kcore_iv._nlx_kcore_LNetGet)(ktm, lcbuf, kb, umd) |
Definition at line 887 of file klnet_core.c.
#define NLX_kcore_LNetMDAttach | ( | ktm, | |
lcbuf, | |||
kb, | |||
umd | |||
) | (*nlx_kcore_iv._nlx_kcore_LNetMDAttach)(ktm, lcbuf, kb, umd) |
Definition at line 883 of file klnet_core.c.
#define NLX_kcore_LNetPut | ( | ktm, | |
lcbuf, | |||
kb, | |||
umd | |||
) | (*nlx_kcore_iv._nlx_kcore_LNetPut)(ktm, lcbuf, kb, umd) |
Definition at line 885 of file klnet_core.c.
Definition at line 404 of file klnet_core.h.
typedef int(* nlx_kcore_queue_op_t) (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb) |
Performs a kernel core tranfer machine buffer queue send or receive operation (message, active, or passive).
ktm | The kernel transfer machine private data. |
cb | The buffer private data. |
kb | The kernel buffer private data. |
Definition at line 257 of file klnet_core.h.
anonymous enum |
Definition at line 64 of file klnet_core.h.
|
static |
Fill in a kiov array with pages from a segment of a m0_bufvec containing kernel logical addresses.
The page reference count is not incremented.
bvec | Motr buffer vector pointer |
n | Segment number in the vector |
kiov | Pointer to array of lnet_kiov_t structures. |
Definition at line 93 of file klnet_vec.c.
|
static |
Count the number of pages in a segment of a m0_bufvec.
bvec | Motr buffer vector pointer |
n | Segment number in the vector |
Definition at line 65 of file klnet_vec.c.
|
static |
Fill in a kiov array with pages from a segment of a m0_bufvec containing user space addresses.
The pages are pinned (but not mapped).
kb | Kcore buffer private pointer. |
bvec | Motr buffer vector pointer. |
n | Segment number in the vector. |
kiov | Pointer to array of lnet_kiov_t structures. |
Definition at line 185 of file klnet_vec.c.
M0_BASSERT | ( | sizeof(__u64) | = =sizeof(uint64_t) | ) |
M0_TL_DEFINE | ( | tms | , |
static | , | ||
struct nlx_kcore_transfer_mc | |||
) |
M0_TL_DEFINE | ( | drv_tms | , |
static | , | ||
struct nlx_kcore_transfer_mc | |||
) |
M0_TL_DEFINE | ( | drv_bufs | , |
static | , | ||
struct nlx_kcore_buffer | |||
) |
M0_TL_DEFINE | ( | drv_bevs | , |
static | , | ||
struct nlx_kcore_buffer_event | |||
) |
M0_TL_DESCR_DEFINE | ( | tms | , |
"nlx tms" | , | ||
static | , | ||
struct nlx_kcore_transfer_mc | , | ||
ktm_tm_linkage | , | ||
ktm_magic | , | ||
M0_NET_LNET_KCORE_TM_MAGIC | , | ||
M0_NET_LNET_KCORE_TMS_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | drv_tms | , |
"drv tms" | , | ||
static | , | ||
struct nlx_kcore_transfer_mc | , | ||
ktm_drv_linkage | , | ||
ktm_magic | , | ||
M0_NET_LNET_KCORE_TM_MAGIC | , | ||
M0_NET_LNET_DEV_TMS_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | drv_bufs | , |
"drv bufs" | , | ||
static | , | ||
struct nlx_kcore_buffer | , | ||
kb_drv_linkage | , | ||
kb_magic | , | ||
M0_NET_LNET_KCORE_BUF_MAGIC | , | ||
M0_NET_LNET_DEV_BUFS_MAGIC | |||
) |
M0_TL_DESCR_DEFINE | ( | drv_bevs | , |
"drv bevs" | , | ||
static | , | ||
struct nlx_kcore_buffer_event | , | ||
kbe_drv_linkage | , | ||
kbe_magic | , | ||
M0_NET_LNET_KCORE_BEV_MAGIC | , | ||
M0_NET_LNET_DEV_BEVS_MAGIC | |||
) |
M0_INTERNAL int nlx_core_buf_active_recv | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Enqueues a buffer for active bulk receive. The cb_match_bits field should be set to the value of the match bits of the remote passive buffer. The cb_addr field should be set with the end point address of the transfer machine with the passive buffer.
The invoker should ensure that the subroutine is not invoked concurrently with any of the other buffer operation initiation subroutines or the nlx_core_buf_event_get() subroutine.
The invoker should provision sufficient buffer event structures prior to the call, using the nlx_core_bevq_provision() subroutine.
lcdom | The domain private data. |
lctm | Transfer machine private data. |
lcbuf | Buffer private data. |
Definition at line 1467 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_active_send | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Enqueues a buffer for active bulk send. See nlx_core_buf_active_recv() for how the buffer is to be initialized.
The invoker should ensure that the subroutine is not invoked concurrently with any of the other buffer operation initiation subroutines or the nlx_core_buf_event_get() subroutine.
The invoker should provision sufficient buffer event structures prior to the call, using the nlx_core_bevq_provision() subroutine.
lcdom | The domain private data. |
lctm | Transfer machine private data. |
lcbuf | Buffer private data. |
Definition at line 1517 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_del | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Cancels a buffer operation if possible.
lcdom | The domain private data. |
lctm | Transfer machine private data. |
lcbuf | Buffer private data. |
Definition at line 1631 of file klnet_core.c.
M0_INTERNAL void nlx_core_buf_deregister | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_buffer * | lcbuf | ||
) |
Deregisters the buffer.
lcdom | The domain private data. |
lcbuf | The buffer private data. |
Definition at line 1330 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_event_wait | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
m0_time_t | timeout | ||
) |
Waits for buffer events, or the timeout.
lcdom | Domain pointer. |
lctm | Transfer machine private data. |
timeout | Absolute time at which to stop waiting. A value of 0 indicates that the subroutine should not wait. |
0 | Events present. |
-ETIMEDOUT | Timed out before events arrived. |
Definition at line 1685 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_msg_recv | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Enqueues a buffer for message reception. Multiple messages may be received into the buffer, space permitting, up to the configured maximum.
The invoker should ensure that the subroutine is not invoked concurrently with any of the other buffer operation initiation subroutines or the nlx_core_buf_event_get() subroutine.
The invoker should provision sufficient buffer event structures prior to the call, using the nlx_core_bevq_provision() subroutine.
lcdom | The domain private data. |
lctm | Transfer machine private data. |
lcbuf | Buffer private data. |
Definition at line 1373 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_msg_send | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Enqueues a buffer for message transmission.
The invoker should ensure that the subroutine is not invoked concurrently with any of the other buffer operation initiation subroutines or the nlx_core_buf_event_get() subroutine.
The invoker should provision sufficient buffer event structures prior to the call, using the nlx_core_bevq_provision() subroutine.
lcdom | The domain private data. |
lctm | Transfer machine private data. |
lcbuf | Buffer private data. |
Definition at line 1417 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_passive_recv | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Enqueues a buffer for passive bulk receive. The match bits for the passive buffer should be set in the buffer with the nlx_core_buf_desc_encode() subroutine before this call. It is guaranteed that the buffer can be remotely accessed when the subroutine returns.
The invoker should ensure that the subroutine is not invoked concurrently with any of the other buffer operation initiation subroutines or the nlx_core_buf_event_get() subroutine.
The invoker should provision sufficient buffer event structures prior to the call, using the nlx_core_bevq_provision() subroutine.
lcdom | The domain private data. |
lctm | Transfer machine private data. |
lcbuf | Buffer private data. |
Definition at line 1566 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_passive_send | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Enqueues a buffer for passive bulk send. See nlx_core_buf_passive_recv() for how the buffer is to be initialized. It is guaranteed that the buffer can be remotely accessed when the subroutine returns.
The invoker should ensure that the subroutine is not invoked concurrently with any of the other buffer operation initiation subroutines or the nlx_core_buf_event_get() subroutine.
The invoker should provision sufficient buffer event structures prior to the call, using the nlx_core_bevq_provision() subroutine.
lcdom | The private data pointer for the domain. |
lctm | Transfer machine private data. |
lcbuf | Buffer private data. |
Definition at line 1617 of file klnet_core.c.
M0_INTERNAL int nlx_core_buf_register | ( | struct nlx_core_domain * | lcdom, |
nlx_core_opaque_ptr_t | buffer_id, | ||
const struct m0_bufvec * | bvec, | ||
struct nlx_core_buffer * | lcbuf | ||
) |
Registers a network buffer. In user space this results in the buffer memory getting pinned. The subroutine allocates private data to associate with the network buffer.
lcdom | The domain private data to be initialized. |
buffer_id | Value to set in the cb_buffer_id field. |
bvec | Buffer vector with core address space pointers. |
lcbuf | The core private data pointer for the buffer. |
Definition at line 1295 of file klnet_core.c.
M0_INTERNAL void nlx_core_dom_fini | ( | struct nlx_core_domain * | lcdom | ) |
Releases LNet transport resources related to the domain.
Definition at line 1207 of file klnet_core.c.
M0_INTERNAL int nlx_core_dom_init | ( | struct m0_net_domain * | dom, |
struct nlx_core_domain * | lcdom | ||
) |
Allocates and initializes the network domain's private field for use by LNet.
dom | The network domain pointer. |
lcdom | The private data pointer for the domain to be initialized. |
Definition at line 1167 of file klnet_core.c.
|
static |
Definition at line 1991 of file klnet_core.c.
M0_INTERNAL m0_bcount_t nlx_core_get_max_buffer_segment_size | ( | struct nlx_core_domain * | lcdom | ) |
Gets the maximum size of a buffer segment.
Definition at line 1226 of file klnet_core.c.
M0_INTERNAL int32_t nlx_core_get_max_buffer_segments | ( | struct nlx_core_domain * | lcdom | ) |
Gets the maximum number of buffer segments.
Definition at line 1237 of file klnet_core.c.
M0_INTERNAL m0_bcount_t nlx_core_get_max_buffer_size | ( | struct nlx_core_domain * | lcdom | ) |
Gets the maximum buffer size (counting all segments).
Definition at line 1220 of file klnet_core.c.
|
static |
Definition at line 2002 of file klnet_core.c.
|
static |
Set a memory location reference, including checksum.
loc | Location to set. |
pg | Pointer to page object. |
off | Offset within the page. |
Definition at line 1127 of file klnet_core.c.
M0_INTERNAL void* nlx_core_mem_alloc | ( | size_t | size, |
unsigned | shift | ||
) |
Allocate zero-filled memory, like m0_alloc(). In user space, this memory is allocated such that it will not cross page boundaries using m0_alloc_aligned().
size | Memory size. |
shift | Alignment, ignored in kernel space. |
Definition at line 1138 of file klnet_core.c.
M0_INTERNAL void nlx_core_mem_free | ( | void * | data, |
size_t | size, | ||
unsigned | shift | ||
) |
Frees memory allocated by nlx_core_mem_alloc().
Definition at line 1143 of file klnet_core.c.
M0_INTERNAL int nlx_core_new_blessed_bev | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm, | ||
struct nlx_core_buffer_event ** | bevp | ||
) |
Subroutine to allocate a new buffer event structure initialized with the producer space self pointer set. This subroutine is defined separately for the kernel and user space.
lcdom | LNet core domain pointer. |
lctm | LNet core transfer machine pointer. In the user space transport this must be initialized at least with the core device driver file descriptor. In kernel space this is not used. |
bevp | Buffer event return pointer. The memory must be allocated with the NLX_ALLOC_PTR() macro or variant. It will be freed with the NLX_FREE_PTR() macro from the nlx_core_bev_free_cb() subroutine. |
Definition at line 1785 of file klnet_core.c.
M0_INTERNAL int nlx_core_nidstr_decode | ( | struct nlx_core_domain * | lcdom, |
const char * | nidstr, | ||
uint64_t * | nid | ||
) |
Decodes a NID string into a NID.
lcdom | The domain private data. |
nidstr | the string to be decoded. |
nid | On success, the resulting NID is returned here. |
-EINVAL | the NID string could not be decoded |
Definition at line 1710 of file klnet_core.c.
M0_INTERNAL int nlx_core_nidstr_encode | ( | struct nlx_core_domain * | lcdom, |
uint64_t | nid, | ||
char | nidstr[M0_NET_LNET_NIDSTR_SIZE] | ||
) |
Encode a NID into its string representation.
lcdom | The domain private data. |
nid | The NID to be converted. |
nidstr | On success, the string form is set here. |
Definition at line 1732 of file klnet_core.c.
M0_INTERNAL int nlx_core_nidstrs_get | ( | struct nlx_core_domain * | lcdom, |
char *** | nidary | ||
) |
Gets a list of strings corresponding to the local LNET network interfaces. The returned array must be released using nlx_core_nidstrs_put().
nidary | A NULL-terminated (like argv) array of NID strings is returned. |
Definition at line 1744 of file klnet_core.c.
M0_INTERNAL void nlx_core_nidstrs_put | ( | struct nlx_core_domain * | lcdom, |
char *** | nidary | ||
) |
Releases the string array returned by nlx_core_nidstrs_get().
Definition at line 1774 of file klnet_core.c.
M0_INTERNAL int nlx_core_tm_start | ( | struct nlx_core_domain * | lcdom, |
struct m0_net_transfer_mc * | tm, | ||
struct nlx_core_transfer_mc * | lctm | ||
) |
Starts a transfer machine. Internally this results in the creation of the LNet EQ associated with the transfer machine.
lcdom | The domain private data. |
tm | The transfer machine pointer. |
lctm | The transfer machine private data to be initialized. The nlx_core_transfer_mc::ctm_addr must be set by the caller. If the lcpea_tmid field value is M0_NET_LNET_TMID_INVALID then a transfer machine identifier is dynamically assigned to the transfer machine and the nlx_core_transfer_mc::ctm_addr is modified in place. |
Definition at line 1942 of file klnet_core.c.
M0_INTERNAL void nlx_core_tm_stop | ( | struct nlx_core_domain * | lcdom, |
struct nlx_core_transfer_mc * | lctm | ||
) |
Stops the transfer machine and release associated resources. All operations must be finalized prior to this call.
lcdom | The domain private data. |
lctm | The transfer machine private data. |
Definition at line 1834 of file klnet_core.c.
|
static |
Tests if the specified address is in use by a running TM.
Definition at line 939 of file klnet_core.c.
|
static |
Performs kernel core tasks relating to adding a buffer to the bulk active receive queue.
ktm | The kernel transfer machine private data. |
cb | The buffer private data. |
kb | The kernel buffer private data. |
Definition at line 1438 of file klnet_core.c.
|
static |
Performs kernel core tasks relating to adding a buffer to the bulk active send queue.
ktm | The kernel transfer machine private data. |
cb | The buffer private data. |
kb | The kernel buffer private data. |
Definition at line 1488 of file klnet_core.c.
|
static |
Performs common kernel core tasks related to de-registering a buffer.
cb | The core private data pointer for the buffer. |
kb | Kernel core private buffer pointer. |
Definition at line 1282 of file klnet_core.c.
|
static |
Performs common kernel core tasks to wait for buffer events.
ctm | The transfer machine private data. |
ktm | The kernel transfer machine private data. |
timeout | Absolute time at which to stop waiting. |
Definition at line 1658 of file klnet_core.c.
|
static |
Performs kernel core tasks relating to adding a buffer to the message receive queue.
ktm | The kernel transfer machine private data. |
cb | The buffer private data. |
kb | The kernel buffer private data. |
Definition at line 1348 of file klnet_core.c.
|
static |
Performs kernel core tasks relating to adding a buffer to the message receive queue.
ktm | The kernel transfer machine private data. |
cb | The buffer private data. |
kb | The kernel buffer private data. |
Definition at line 1394 of file klnet_core.c.
|
static |
Performs kernel core tasks relating to adding a buffer to the bulk passive receive queue.
ktm | The kernel transfer machine private data. |
cb | The buffer private data. |
kb | The kernel buffer private data. |
Definition at line 1538 of file klnet_core.c.
|
static |
Performs kernel core tasks relating to adding a buffer to the bulk passive send queue.
ktm | The kernel transfer machine private data. |
cb | The buffer private data. |
kb | The kernel buffer private data. |
Definition at line 1587 of file klnet_core.c.
|
static |
Performs common kernel core tasks related to registering a network buffer. The nlx_kcore_buffer::kb_kiov is not set.
kd | Kernel core private domain pointer. |
buffer_id | Value to set in the cb_buffer_id field. |
cb | The core private data pointer for the buffer. |
kb | Kernel core private buffer pointer. |
Definition at line 1251 of file klnet_core.c.
|
static |
KCore buffer event invariant.
Definition at line 918 of file klnet_core.c.
|
static |
KCore buffer invariant.
Definition at line 908 of file klnet_core.c.
|
static |
This subroutine sets up the LNet kernel I/O vector in the kcore buffer from a bufvec containing kernel logical addresses.
The page reference count is not incremented.
kb | Kcore buffer private pointer |
bvec | Vector with kernel logical addresses. |
-EFBIG | if the IO vector is too large. |
Definition at line 133 of file klnet_vec.c.
|
static |
This subroutine sets up the LNet kernel I/O vector in the kcore buffer from a bufvec containing userspace virtual addresses.
The pages referenced by the bvec->ov_buf are pinned in kernel memory.
kb | Kcore buffer private pointer. |
bvec | Vector with userspace virtual addresses. |
-EFBIG | if the IO vector is too large. |
Definition at line 236 of file klnet_vec.c.
|
static |
Maps a page that should point to a nlx_core_buffer_event. Uses kmap() because this subroutine can be used on contexts that will block.
kbe | Pointer to kcore buffer event private data. |
Definition at line 651 of file klnet_utils.c.
|
static |
Unmaps the page that contains a nlx_core_buffer_event using kunmap().
kbe | Pointer to kcore buffer event private data. |
Definition at line 671 of file klnet_utils.c.
|
static |
Maps a page that should point to a nlx_core_buffer. Uses kmap() because this subroutine can be used on contexts that will block.
kb | Pointer to kcore buffer private data. |
Definition at line 617 of file klnet_utils.c.
|
static |
Unmaps the page that contains a nlx_core_buffer using kunmap().
kb | Pointer to kcore buffer private data. |
Definition at line 637 of file klnet_utils.c.
|
static |
Finilizes the core private data associated with a kernel core private data object.
kd | Kernel core private data pointer. |
cd | Core private data pointer. |
Definition at line 1200 of file klnet_core.c.
|
static |
Initializes the core private data given a previously initialized kernel core private data object.
kd | Kernel core private data pointer. |
cd | Core private data pointer. |
Definition at line 1157 of file klnet_core.c.
|
static |
Maps a page that should point to a nlx_core_domain. Uses kmap() because this subroutine can be used on contexts that will block.
kd | kernel private object containing location reference to be mapped |
Definition at line 582 of file klnet_utils.c.
|
static |
Unmaps the page that contains a nlx_core_domain using kunmap().
kd | Pointer to kcore domain private data. |
Definition at line 603 of file klnet_utils.c.
|
static |
Maps a page that should point to a nlx_core_transfer_mc. Uses kmap() because this subroutine can be used on contexts that will block.
ktm | Pointer to kcore transfer machine private data. |
Definition at line 685 of file klnet_utils.c.
|
static |
Maps a page that should point to a nlx_core_transfer_mc. Uses kmap_atomic(), thus it is user responsibility to serialize this routine CPU-wise (each CPU has its own set of slots).
ktm | Pointer to kcore transfer machine private data. |
Definition at line 722 of file klnet_utils.c.
|
static |
Unmaps the page that contains a nlx_core_transfer_mc using kunmap().
ktm | Pointer to kcore transfer machine private data. |
Definition at line 705 of file klnet_utils.c.
|
static |
Unmaps the page that contains a nlx_core_transfer_mc. Uses kunmap_atomic().
ctm | Pointer to corresponding core TM private data. |
Definition at line 749 of file klnet_utils.c.
|
static |
KCore domain invariant.
Definition at line 897 of file klnet_core.c.
|
static |
Callback for the LNet Event Queue. It must be re-entrant, and not make any calls to the LNet API. It must not perform non-atomic operations, such as locking a mutex. An atomic spin lock is used to synchronize access to the nlx_core_transfer_mc::nlx_core_bev_cqueue.
Definition at line 1004 of file klnet_core.c.
|
inlinestatic |
Helper subroutine to decode header data from an LNetPut event.
hdr_data | |
portal | Pointer to portal. |
tmid | Pointer to transfer machine identifier. |
Definition at line 229 of file klnet_utils.c.
|
static |
Helper subroutine to encode header data for LNetPut operations.
kctm | Pointer to kcore TM private data. |
Definition at line 212 of file klnet_utils.c.
|
inlinestatic |
Helper subroutine to encode header data for LNetPut operations.
tmid | Transfer machine id |
portal | Portal number |
Definition at line 200 of file klnet_utils.c.
|
static |
Finalizes the kernel core domain private data object.
kd | kernel core private data pointer for the domain to be finalized. |
Definition at line 2078 of file klnet_core.c.
|
static |
Initializes the kernel core domain private data object. The nlx_kcore_domain::kd_cd_loc is empty on return, denoting the initial state of the domain. The caller must set this field before calling nlx_kcore_core_dom_init().
kd | kernel core private data pointer for the domain to be initialized. |
Definition at line 2061 of file klnet_core.c.
|
static |
Helper subroutine to adjust the length of the kiov vector in a UMD to match a specified byte length. This is needed for SEND and active buffer operations. Restore the kiov with nlx_kcore_kiov_restore_length().
ktm | Pointer to kcore TM private data. |
kcb | Pointer to kcore buffer private data with match bits set. |
umd | Pointer to the UMD. |
bytes | The byte count desired. |
Definition at line 314 of file klnet_utils.c.
|
static |
|
static |
Helper subroutine to restore the original length of the buffer's kiov.
kcb | Pointer to kcore buffer private data with match bits set. |
Definition at line 352 of file klnet_utils.c.
|
static |
Helper subroutine to fetch a buffer from a remote destination using LNetGet()
.
kctm | Pointer to kcore TM private data. |
lcbuf | Pointer to kcore buffer private data with match bits set, and the address of the remote destination in struct nlx_core_buffer::cb_addr. |
kcb | Pointer to kcore buffer private data. |
umd | Pointer to lnet_md_t structure for the buffer, with appropriate values set for the desired operation. |
Definition at line 523 of file klnet_utils.c.
|
static |
Helper subroutine to attach a network buffer to the match list associated with the transfer machine's portal.
kctm | Pointer to kcore TM private data. |
lcbuf | Pointer to core buffer private data with match bits set in the cb_match_bits field, and the network address in cb_addr. |
kcb | Pointer to kcore buffer private data. |
umd | Pointer to lnet_md_t structure for the buffer, with appropriate values set for the desired operation. |
Definition at line 377 of file klnet_utils.c.
|
static |
Helper subroutine to unlink an MD.
kctm | Pointer to kcore TM private data. |
kcb | Pointer to kcore buffer private data with kb_mdh set. |
Definition at line 433 of file klnet_utils.c.
|
static |
Helper subroutine to send a buffer to a remote destination using LNetPut()
.
kctm | Pointer to kcore TM private data. |
lcbuf | Pointer to core buffer private data with match bits set, and the address of the remote destination in struct nlx_core_buffer::cb_addr. |
kcb | Pointer to kcore buffer private data. |
umd | Pointer to lnet_md_t structure for the buffer, with appropriate values set for the desired operation. |
Definition at line 461 of file klnet_utils.c.
|
static |
Find an unused tmid.
cepa | The NID, PID and Portal are used to filter the nlx_kcore_tms. |
Definition at line 953 of file klnet_core.c.
|
static |
Decodes a NID string into a NID.
nidstr | the string to be decoded. |
nid | On success, the resulting NID is returned here. |
-EINVAL | the NID string could not be decoded. |
Definition at line 1702 of file klnet_core.c.
|
static |
Encode a NID into its string representation.
nid | The NID to be converted. |
nidstr | On success, the string form is set here. |
Definition at line 1721 of file klnet_core.c.
|
static |
Helper subroutine to determine the number of kiov vector elements are required to match a specified byte length.
kiov | Pointer to the KIOV vector. |
kiov_len | Length of the KIOV vector. |
bytes | The byte count desired. |
last_len | Returns the number of bytes used in the last kiov element. |
Definition at line 302 of file klnet_vec.c.
|
static |
KCore tm invariant.
Definition at line 929 of file klnet_core.c.
|
static |
Performs kernel core tasks related to starting a transfer machine. Internally this results in the creation of the LNet EQ associated with the transfer machine.
kd | The kernel domain for this transfer machine. |
ctm | The transfer machine private data to be initialized. The nlx_core_transfer_mc::ctm_addr must be set by the caller. If the lcpea_tmid field value is M0_NET_LNET_TMID_INVALID then a transfer machine identifier is dynamically assigned to the transfer machine and the nlx_core_transfer_mc::ctm_addr is modified in place. |
ktm | The kernel transfer machine private data to be initialized. |
Definition at line 1858 of file klnet_core.c.
|
static |
Performs kernel core tasks relating to stopping a transfer machine. Kernel resources are released.
ctm | The transfer machine private data. |
ktm | The kernel transfer machine private data. |
Definition at line 1811 of file klnet_core.c.
|
static |
Add the transfer machine to the nlx_kcore_tms. The list is kept in descending order sorted by nlx_core_ep_addr::cepa_tmid.
Definition at line 980 of file klnet_core.c.
|
static |
Helper subroutine to fill in the common fields of the lnet_md_t associated with a network buffer and the common fields of the kcore buffer private data.
kctm | Pointer to kcore TM private data. |
lcbuf | Pointer to core buffer private data with match bits set. |
kcb | Pointer to kcore buffer private data with match bits set. |
threshold | Value for threshold field. Should be at least 1. |
max_size | Max size value, if not zero. If provided the LNET_MD_MAX_SIZE flag is set. |
options | Optional flags to be set. If not 0, only LNET_MD_OP_PUT or LNET_MD_OP_GET are accepted. |
isLNetGetOp | Set to true if the lnet_md_t is to be used to create an MD that will be used in an LNetGet operation. The threshold field is forced to 2, and the out-of-order fields of the nlx_kcore_buffer are reset. |
umd | Pointer to return structure to be filled in. The ktm_eqh handle is used by default. Adjust if necessary. |
Definition at line 255 of file klnet_utils.c.
|
static |
Definition at line 2035 of file klnet_core.c.
|
static |
Definition at line 873 of file klnet_core.c.
|
static |
Kernel core lock. Provides serialization across the nlx_kcore_tms list.
Definition at line 822 of file klnet_core.c.
|
static |
List of all transfer machines. Protected by nlx_kcore_mutex.
Definition at line 825 of file klnet_core.c.