84 #define _NLXIS(s) ._##s = s 94 #define NLX_core_buf_event_wait(lcdom, lctm, timeout) \ 95 (*nlx_xo_iv._nlx_core_buf_event_wait)(lcdom, lctm, timeout) 96 #define NLX_ep_create(epp, tm, cepa) \ 97 (*nlx_xo_iv._nlx_ep_create)(epp, tm, cepa) 98 #define NLX_tm_get_buffer_timeout_tick(tm) \ 99 (*nlx_xo_iv._nlx_tm_get_buffer_timeout_tick)(tm) 100 #define NLX_tm_timeout_buffers(tm, now) \ 101 (*nlx_xo_iv._nlx_tm_timeout_buffers)(tm, now) 115 return M0_RC(-ENOMEM);
116 dom->nd_xprt_private = dp;
224 nb->nb_xprt_private =
NULL;
272 if (nbd->
nbd_len !=
sizeof *cbd) {
388 NLXDBGP(tp, 1,
"%p: nlx_xo_buf_del(%p, %lX)\n", tp, nb,
514 q->nqs_num_f_events++;
515 NLXDBGP(tp, 1,
"%p: skipping event\n", tp);
518 NLXDBGP(tp, 1,
"%p: event conversion failed\n", tp);
534 NLXDBGP(tp, 3,
"%p: reducing need by %d\n",
538 NLXDBGP(tp, 1,
"%p: event buf:%p qt:%d status:%d flags:%lx\n",
560 NLXDBGP(tp,2,
"%p: delivered %d events\n", tp, num_events);
678 #if !defined(ENABLE_SOCK_MOCK_LNET) || defined(__KERNEL__) 685 const struct m0_net_xprt m0_net_lnet_mocked_xprt = {
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_segment_size(struct m0_net_domain *dom)
struct m0_net_transfer_mc * nb_tm
static bool nlx_dom_invariant(const struct m0_net_domain *dom)
static m0_bcount_t nlx_xo_get_max_buffer_desc_size(const struct m0_net_domain *dom)
M0_INTERNAL int m0_bitmap_init(struct m0_bitmap *map, size_t nr)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static m0_bcount_t nlx_xo_rpc_max_seg_size(struct m0_net_domain *ndom)
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 bool nlx_xo_buffer_bufvec_invariant(const struct m0_net_buffer *nb)
M0_INTERNAL int nlx_core_buf_del(struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
struct m0_net_end_point xe_ep
static struct m0_semaphore q
M0_INTERNAL void m0_bitmap_fini(struct m0_bitmap *map)
static int32_t nlx_xo_get_max_buffer_segments(const struct m0_net_domain *dom)
M0_INTERNAL void nlx_core_dom_fini(struct nlx_core_domain *cd)
struct m0_bufvec nb_buffer
M0_INTERNAL void m0_net__tm_cancel(struct m0_net_transfer_mc *tm)
int m0_thread_join(struct m0_thread *q)
M0_INTERNAL m0_bcount_t nlx_core_get_max_buffer_segment_size(struct nlx_core_domain *lcdom)
struct m0_bitmap xtm_processors
const struct m0_net_xprt m0_net_lnet_xprt
struct nlx_core_ep_addr cb_addr
static void nlx_xo_dom_fini(struct m0_net_domain *dom)
char xe_addr[M0_NET_LNET_XEP_ADDR_LEN]
struct m0_net_qstats ntm_qstats[M0_NET_QT_NR]
enum m0_net_tm_state ntm_state
struct m0_net_domain * ntm_dom
#define M0_THREAD_INIT(thread, TYPE, init, func, arg, namefmt,...)
m0_bcount_t nb_min_receive_size
#define container_of(ptr, type, member)
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
struct m0_net_buffer * nbe_buffer
static int nlx_xo__nbd_recover(struct m0_net_transfer_mc *tm, const struct m0_net_buf_desc *nbd, struct nlx_core_buf_desc *cbd)
int(* _nlx_tm_timeout_buffers)(struct m0_net_transfer_mc *tm, m0_time_t now)
M0_INTERNAL void m0_net_buffer_event_post(const struct m0_net_buffer_event *ev)
static void nlx_xo_buf_deregister(struct m0_net_buffer *nb)
M0_INTERNAL void m0_cond_init(struct m0_cond *cond, struct m0_mutex *mutex)
static void nlx_tm_ev_worker(struct m0_net_transfer_mc *tm)
static bool nlx_xo_bev_pending(struct m0_net_transfer_mc *tm)
M0_INTERNAL int nlx_core_buf_active_recv(struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
M0_INTERNAL void nlx_core_dom_set_debug(struct nlx_core_domain *lcdom, unsigned dbg)
M0_INTERNAL void nlx_core_bevq_release(struct nlx_core_transfer_mc *lctm, size_t release)
#define M0_ASSERT_EX(cond)
uint64_t nlx_core_opaque_ptr_t
struct nlx_core_ep_addr ctm_addr
return M0_ERR(-EOPNOTSUPP)
static struct nlx_core_ep_addr * nlx_ep_to_core(struct m0_net_end_point *ep)
struct m0_net_domain * xd_dom
static int nlx_xo_core_bev_to_net_bev(struct m0_net_transfer_mc *tm, struct nlx_core_buffer_event *lcbev, struct m0_net_buffer_event *nbev)
enum m0_net_queue_type nb_qtype
M0_INTERNAL int nlx_core_bevq_provision(struct nlx_core_domain *lcdom, struct nlx_core_transfer_mc *lctm, size_t need)
uint32_t nb_max_receive_msgs
static m0_time_t nlx_tm_get_buffer_timeout_tick(const struct m0_net_transfer_mc *tm)
M0_INTERNAL bool m0_mutex_is_locked(const struct m0_mutex *mutex)
static m0_bcount_t nlx_xo_get_max_buffer_size(const struct m0_net_domain *dom)
M0_INTERNAL void m0_cond_fini(struct m0_cond *cond)
static bool nlx_buffer_invariant(const struct m0_net_buffer *nb)
m0_bcount_t cb_min_receive_size
static int nlx_xo_tm_confine(struct m0_net_transfer_mc *tm, const struct m0_bitmap *processors)
struct m0_chan * xtm_ev_chan
struct nlx_core_domain xd_core
static int nlx_xo_tm_init(struct m0_net_transfer_mc *tm)
#define NLX_ALLOC(ptr, len)
static struct m0_stob_domain * dom
M0_INTERNAL void m0_cond_signal(struct m0_cond *cond)
M0_INTERNAL m0_bcount_t nlx_core_get_max_buffer_size(struct nlx_core_domain *lcdom)
uint32_t ntm_callback_counter
static void nlx_xo_bev_deliver_all(struct m0_net_transfer_mc *tm)
M0_INTERNAL int32_t nlx_core_get_max_buffer_segments(struct nlx_core_domain *lcdom)
struct m0_net_domain * nb_dom
static bool nlx_ep_invariant(const struct m0_net_end_point *ep)
#define NLX_ALLOC_ALIGNED_PTR(ptr)
M0_INTERNAL int nlx_core_buf_active_send(struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
M0_INTERNAL void m0_net_desc_free(struct m0_net_buf_desc *desc)
M0_INTERNAL void nlx_core_buf_deregister(struct nlx_core_domain *cd, struct nlx_core_buffer *cb)
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_size(struct m0_net_domain *dom)
struct m0_cond xtm_ev_cond
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 bool nlx_core_buf_event_get(struct nlx_core_transfer_mc *lctm, struct nlx_core_buffer_event *lcbe)
static uint32_t nlx_xo_rpc_max_recv_msgs(struct m0_net_domain *ndom, m0_bcount_t rpc_size)
static uint32_t nlx_xo_rpc_max_segs_nr(struct m0_net_domain *ndom)
static uint64_t min64u(uint64_t a, uint64_t b)
static struct nlx_xo_interceptable_subs nlx_xo_iv
uint32_t cb_max_operations
int(* _nlx_ep_create)(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const struct nlx_core_ep_addr *cepa)
static int nlx_ep_create(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const struct nlx_core_ep_addr *cepa)
static int nlx_tm_timeout_buffers(struct m0_net_transfer_mc *tm, m0_time_t now)
static int nlx_xo_buf_add(struct m0_net_buffer *nb)
M0_INTERNAL m0_bcount_t m0_vec_count(const struct m0_vec *vec)
M0_INTERNAL void m0_bitmap_copy(struct m0_bitmap *dst, const struct m0_bitmap *src)
int nlx_core_ep_addr_decode(struct nlx_core_domain *lcdom, const char *ep_addr, struct nlx_core_ep_addr *cepa)
static int nlx_xo_end_point_create(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const char *addr)
M0_INTERNAL int nlx_core_buf_passive_recv(struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
M0_INTERNAL void nlx_core_buf_desc_encode(struct nlx_core_transfer_mc *lctm, struct nlx_core_buffer *lcbuf, struct nlx_core_buf_desc *cbd)
struct m0_thread xtm_ev_thread
static int nlx_xo_buf_register(struct m0_net_buffer *nb)
M0_INTERNAL int nlx_core_dom_init(struct m0_net_domain *dom, struct nlx_core_domain *cd)
M0_INTERNAL int nlx_core_buf_passive_send(struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
static m0_bcount_t nlx_xo_rpc_max_msg_size(struct m0_net_domain *ndom, m0_bcount_t rpc_size)
static void nlx_xo_buf_del(struct m0_net_buffer *nb)
static struct m0_chan chan[RDWR_REQUEST_MAX]
static int nlx_xo_bev_deliver_sync(struct m0_net_transfer_mc *tm)
#define NLXDBGP(ptr, dbg, fmt,...)
static m0_bcount_t nlx_xo_get_max_buffer_segment_size(const struct m0_net_domain *dom)
#define NLX_FREE_ALIGNED_PTR(ptr)
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_xo_tm_stop(struct m0_net_transfer_mc *tm, bool cancel)
static const struct m0_net_xprt_ops nlx_xo_xprt_ops
static bool nlx_tm_invariant(const struct m0_net_transfer_mc *tm)
enum m0_net_queue_type cb_qtype
int(* xo_dom_init)(const struct m0_net_xprt *xprt, struct m0_net_domain *dom)
struct m0_net_buf_desc nb_desc
static int nlx_xo__nbd_allocate(struct m0_net_transfer_mc *tm, const struct nlx_core_buf_desc *cbd, struct m0_net_buf_desc *nbd)
static struct bulkio_params * bp
struct m0_net_transfer_mc * xtm_tm
M0_INTERNAL int nlx_core_buf_msg_send(struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, struct nlx_core_buffer *cb)
struct m0_net_xprt * xprt
static int nlx_xo_tm_start(struct m0_net_transfer_mc *tm, const char *addr)
M0_INTERNAL m0_bcount_t default_xo_rpc_max_msg_size(struct m0_net_domain *ndom, m0_bcount_t rpc_size)
int(* _nlx_core_buf_event_wait)(struct nlx_core_domain *lcdom, struct nlx_core_transfer_mc *lctm, m0_time_t timeout)
M0_INTERNAL void m0_chan_broadcast(struct m0_chan *chan)
static int nlx_xo_dom_init(const struct m0_net_xprt *xprt, struct m0_net_domain *dom)
M0_INTERNAL int nlx_core_buf_desc_decode(struct nlx_core_transfer_mc *lctm, struct nlx_core_buffer *lcbuf, struct nlx_core_buf_desc *cbd)
static void nlx_xo_bev_notify(struct m0_net_transfer_mc *tm, struct m0_chan *chan)
struct m0_net_end_point * nb_ep
m0_time_t(* _nlx_tm_get_buffer_timeout_tick)(const struct m0_net_transfer_mc *tm)
enum m0_thread_state t_state
struct nlx_core_transfer_mc xtm_core
#define M0_IMPOSSIBLE(fmt,...)
static void nlx_xo_tm_fini(struct m0_net_transfer_mc *tm)