Motr  M0
klnet_core.c File Reference
#include "lib/mutex.h"
#include "lib/string.h"
#include "net/lnet/linux_kernel/klnet_core.h"
#include <lnet/lnet.h>
#include <lnet/api.h>
#include <lnet/lib-types.h>
#include "net/lnet/linux_kernel/klnet_vec.c"
#include "net/lnet/linux_kernel/klnet_utils.c"
Include dependency graph for klnet_core.c:

Go to the source code of this file.

Data Structures

struct  nlx_kcore_interceptable_subs
 

Macros

#define _NLXIS(s)   ._##s = s
 
#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)
 

Functions

 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_DEFINE (tms, static, struct nlx_kcore_transfer_mc)
 
 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_DEFINE (drv_tms, static, struct nlx_kcore_transfer_mc)
 
 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_DEFINE (drv_bufs, static, struct nlx_kcore_buffer)
 
 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_TL_DEFINE (drv_bevs, static, struct nlx_kcore_buffer_event)
 
 M0_BASSERT (sizeof(__u64)==sizeof(uint64_t))
 
static bool nlx_kcore_domain_invariant (const struct nlx_kcore_domain *kd)
 
static bool nlx_kcore_buffer_invariant (const struct nlx_kcore_buffer *kcb)
 
static bool nlx_kcore_buffer_event_invariant (const struct nlx_kcore_buffer_event *kbe)
 
static bool nlx_kcore_tm_invariant (const struct nlx_kcore_transfer_mc *kctm)
 
static bool nlx_kcore_addr_in_use (struct nlx_core_ep_addr *cepa)
 
static int nlx_kcore_max_tmid_find (struct nlx_core_ep_addr *cepa)
 
static void nlx_kcore_tms_list_add (struct nlx_kcore_transfer_mc *kctm)
 
static void nlx_kcore_eq_cb (lnet_event_t *event)
 
static void nlx_core_kmem_loc_set (struct nlx_core_kmem_loc *loc, struct page *pg, uint32_t off)
 
M0_INTERNAL void * nlx_core_mem_alloc (size_t size, unsigned shift)
 
M0_INTERNAL void nlx_core_mem_free (void *data, size_t size, unsigned shift)
 
static int nlx_kcore_core_dom_init (struct nlx_kcore_domain *kd, struct nlx_core_domain *cd)
 
M0_INTERNAL int nlx_core_dom_init (struct m0_net_domain *dom, struct nlx_core_domain *cd)
 
static void nlx_kcore_core_dom_fini (struct nlx_kcore_domain *kd, struct nlx_core_domain *cd)
 
M0_INTERNAL void nlx_core_dom_fini (struct nlx_core_domain *cd)
 
M0_INTERNAL m0_bcount_t nlx_core_get_max_buffer_size (struct nlx_core_domain *lcdom)
 
M0_INTERNAL m0_bcount_t nlx_core_get_max_buffer_segment_size (struct nlx_core_domain *lcdom)
 
M0_INTERNAL int32_t nlx_core_get_max_buffer_segments (struct nlx_core_domain *lcdom)
 
static int nlx_kcore_buf_register (struct nlx_kcore_domain *kd, nlx_core_opaque_ptr_t buffer_id, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
static void nlx_kcore_buf_deregister (struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
M0_INTERNAL int nlx_core_buf_register (struct nlx_core_domain *cd, nlx_core_opaque_ptr_t buffer_id, const struct m0_bufvec *bvec, struct nlx_core_buffer *cb)
 
M0_INTERNAL void nlx_core_buf_deregister (struct nlx_core_domain *cd, struct nlx_core_buffer *cb)
 
static int nlx_kcore_buf_msg_recv (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
M0_INTERNAL int nlx_core_buf_msg_recv (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
 
static int nlx_kcore_buf_msg_send (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
M0_INTERNAL int nlx_core_buf_msg_send (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
 
static int nlx_kcore_buf_active_recv (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
M0_INTERNAL int nlx_core_buf_active_recv (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
 
static int nlx_kcore_buf_active_send (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
M0_INTERNAL int nlx_core_buf_active_send (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
 
static int nlx_kcore_buf_passive_recv (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
M0_INTERNAL int nlx_core_buf_passive_recv (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
 
static int nlx_kcore_buf_passive_send (struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
 
M0_INTERNAL int nlx_core_buf_passive_send (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
 
M0_INTERNAL int nlx_core_buf_del (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
 
static int nlx_kcore_buf_event_wait (struct nlx_core_transfer_mc *ctm, struct nlx_kcore_transfer_mc *ktm, m0_time_t timeout)
 
M0_INTERNAL int nlx_core_buf_event_wait (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, m0_time_t timeout)
 
static int nlx_kcore_nidstr_decode (const char *nidstr, uint64_t *nid)
 
M0_INTERNAL int nlx_core_nidstr_decode (struct nlx_core_domain *lcdom, const char *nidstr, uint64_t *nid)
 
static int nlx_kcore_nidstr_encode (uint64_t nid, char nidstr[M0_NET_LNET_NIDSTR_SIZE])
 
M0_INTERNAL int nlx_core_nidstr_encode (struct nlx_core_domain *lcdom, uint64_t nid, char nidstr[M0_NET_LNET_NIDSTR_SIZE])
 
M0_INTERNAL int nlx_core_nidstrs_get (struct nlx_core_domain *lcdom, char ***nidary)
 
M0_INTERNAL void nlx_core_nidstrs_put (struct nlx_core_domain *lcdom, char ***nidary)
 
M0_INTERNAL int nlx_core_new_blessed_bev (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer_event **bevp)
 
static void nlx_kcore_tm_stop (struct nlx_core_transfer_mc *ctm, struct nlx_kcore_transfer_mc *ktm)
 
M0_INTERNAL void nlx_core_tm_stop (struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm)
 
static int nlx_kcore_tm_start (struct nlx_kcore_domain *kd, struct nlx_core_transfer_mc *ctm, struct nlx_kcore_transfer_mc *ktm)
 
M0_INTERNAL int nlx_core_tm_start (struct nlx_core_domain *cd, struct m0_net_transfer_mc *tm, struct nlx_core_transfer_mc *ctm)
 
static void nlx_core_fini (void)
 
static int nlx_core_init (void)
 
static int nlx_kcore_kcore_dom_init (struct nlx_kcore_domain *kd)
 
static void nlx_kcore_kcore_dom_fini (struct nlx_kcore_domain *kd)
 

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
 

Macro Definition Documentation

◆ _NLXIS

#define _NLXIS (   s)    ._##s = s