29 #include <linux/version.h> 30 #include <linux/module.h> 31 #include <linux/proc_fs.h> 50 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 73 rc = copy_to_user(
buffer, &code,
sizeof code);
106 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 118 printk(
"%s: writing wrong size %ld to proc file, max %d\n",
150 printk(
"%s: unknown user test state: %02x\n", __func__, *
buf);
158 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 170 .owner = THIS_MODULE,
175 .llseek = default_llseek,
181 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) 194 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) 223 #define UT_BUFVEC_ALLOC(v,n) \ 224 if (!ut_bufvec_alloc(&v,n)) { \ 225 M0_IMPOSSIBLE("no memory");\ 229 #define UT_BUFVEC_FREE(v) \ 230 m0_free(v.ov_vec.v_count); \ 253 base = (
void *)((uint64_t)&
base & PAGE_MASK);
255 #define EXP_SEG_COUNT(ptr,segsize,expcount) \ 256 bv1.ov_buf[0] = (ptr); \ 257 bv1.ov_vec.v_count[0] = (segsize); \ 258 num_pages = bufvec_seg_page_count(&bv1, 0); \ 259 M0_UT_ASSERT(num_pages == (expcount)) 309 bsegs = LNET_MAX_IOV;
374 const char *epstr[] = {
375 "127.0.0.1@tcp:12345:30:10",
376 "127.0.0.1@tcp:12345:30:*",
377 "4.4.4.4@tcp:42:29:28" 379 const char *failepstr[] = {
380 "notip@tcp:12345:30:10",
381 "notnid:12345:30:10",
382 "127.0.0.1@tcp:notpid:30:10",
383 "127.0.0.1@tcp:12:notportal:10",
384 "127.0.0.1@tcp:12:30:nottm",
385 "127.0.0.1@tcp:12:30:-10",
386 "127.0.0.1@tcp:12:30:4096",
412 for (
i = 0; nidstrs[
i] !=
NULL; ++
i) {
414 network = strchr(nidstrs[
i],
'@');
415 if (network !=
NULL && strcmp(network,
"@tcp") == 0)
420 if (nidstrs[
i] !=
NULL) {
460 #define TEST_HDR_DATA_ENCODE(_p, _t) \ 461 ktm.ktm_addr.cepa_tmid = (_t); \ 462 ktm.ktm_addr.cepa_portal = (_p); \ 463 nlx_kcore_hdr_data_decode(nlx_kcore_hdr_data_encode(&ktm), \ 465 M0_UT_ASSERT(portal == (_p)); \ 466 M0_UT_ASSERT(tmid == (_t)) 474 #undef TEST_HDR_DATA_ENCODE 491 NLXDBG(kctm, 1, printk(
"intercepted LNetMDAttach\n"));
492 NLXDBG(kctm, 1, nlx_kprint_lnet_md(
"ktest_msg", umd));
528 NLXDBG(kctm, 1, printk(
"intercepted LNetPut\n"));
529 NLXDBG(kctm, 1, nlx_kprint_lnet_md(
"ktest_msg", umd));
541 M0_UT_ASSERT(!(umd->options & (LNET_MD_OP_PUT | LNET_MD_OP_GET)));
594 ev.md.user_ptr = kcb;
595 ev.type = LNET_EVENT_PUT;
596 ev.mlength = mlength;
597 ev.rlength = mlength;
600 ev.unlinked = unlinked;
601 ev.initiator.nid =
addr->cepa_nid;
602 ev.initiator.pid =
addr->cepa_pid;
615 ev.md.user_ptr = kcb;
616 ev.type = LNET_EVENT_SEND;
617 ev.mlength = mlength;
618 ev.rlength = mlength;
632 ev.type = LNET_EVENT_ACK;
648 for (
i = 0;
i < len; ++
i, ++kiov) {
661 const lnet_kiov_t *
k2,
666 for (
i = 0;
i < len; ++
i, ++
k1, ++
k2)
667 if (
k1->kiov_page !=
k2->kiov_page ||
668 k1->kiov_len !=
k2->kiov_len ||
669 k1->kiov_offset !=
k2->kiov_offset)
679 for (
i = 0,
count = 0;
i < len; ++
i, ++k) {
680 count += k->kiov_len;
709 NLXDBGPnl(td,1,
"TEST: net buffer to MD\n");
726 NLXDBGPnl(td,1,
"TEST: kiov size arithmetic\n");
729 nlx_kcore_num_kiov_entries_for_bytes((lnet_kiov_t *) umd.start, \ 730 umd.length, (b), &last) 756 NLXDBGPnl(td,1,
"TEST: kiov adjustments for length\n");
773 lnet_kiov_t *k = kcb1->
kb_kiov;
787 kdup[umd.length - 1].kiov_len);
804 NLXDBGPnl(td,1,
"TEST: receive queue logic\n");
829 NLXDBGPnl(td,1,
"TEST: bevq delivery, single\n");
838 addr.cepa_portal = 35;
889 addr.cepa_tmid -= 12;
922 NLXDBGPnl(td,1,
"TEST: bevq delivery, batched\n");
992 NLXDBGPnl(td,1,
"TEST: EP failure during message receive\n");
1042 addr.cepa_portal += 1;
1081 NLXDBGPnl(td,1,
"TEST: send queue success logic\n");
1089 sprintf(epstr,
"%s:%d:%d:1024",
1132 NLXDBGPnl(td,1,
"TEST: send queue failure logic\n");
1140 sprintf(epstr,
"%s:%d:%d:1024",
1214 NLXDBG(kctm, 1, printk(
"intercepted LNetMDAttach (bulk)\n"));
1215 NLXDBG(kctm, 2, nlx_kprint_lnet_md(
"ktest_bulk", umd));
1266 NLXDBG(kctm, 1, printk(
"intercepted LNetGet (bulk)\n"));
1267 NLXDBG(kctm, 2, nlx_kprint_lnet_md(
"ktest_bulk", umd));
1279 M0_UT_ASSERT(!(umd->options & (LNET_MD_OP_PUT | LNET_MD_OP_GET)));
1297 NLXDBG(kctm, 1, printk(
"intercepted LNetPut (bulk)\n"));
1298 NLXDBG(kctm, 2, nlx_kprint_lnet_md(
"ktest_bulk", umd));
1310 M0_UT_ASSERT(!(umd->options & (LNET_MD_OP_PUT | LNET_MD_OP_GET)));
1325 ev.md.user_ptr = kcb;
1326 ev.type = LNET_EVENT_PUT;
1327 ev.mlength = mlength;
1328 ev.rlength = mlength;
1341 ev.md.user_ptr = kcb;
1342 ev.type = LNET_EVENT_GET;
1343 ev.mlength = mlength;
1344 ev.rlength = mlength;
1360 ev.md.user_ptr = kcb;
1361 ev.type = LNET_EVENT_SEND;
1362 ev.mlength = mlength;
1363 ev.rlength = mlength;
1365 ev.unlinked = unlinked;
1366 ev.md.threshold = threshold;
1379 ev.md.user_ptr = kcb;
1380 ev.type = LNET_EVENT_REPLY;
1381 ev.mlength = mlength;
1382 ev.rlength = mlength;
1384 ev.unlinked = unlinked;
1385 ev.md.threshold = threshold;
1394 ev.md.user_ptr = kcb;
1395 ev.type = LNET_EVENT_UNLINK;
1426 NLXDBGPnl(td, 1,
"TEST: passive receive event delivery\n");
1469 NLXDBGPnl(td, 1,
"TEST: passive receive event delivery (UNLINK)\n");
1514 NLXDBGPnl(td, 1,
"TEST: passive send event delivery\n");
1556 NLXDBGPnl(td, 1,
"TEST: passive send event delivery (UNLINK)\n");
1601 NLXDBGPnl(td, 1,
"TEST: active receive event delivery (SEND/REPLY)\n");
1639 NLXDBGPnl(td, 1,
"TEST: active receive event delivery (REPLY/SEND)\n");
1686 NLXDBGPnl(td, 1,
"TEST: active receive event delivery " 1687 "(SEND failure [/no REPLY])\n");
1720 NLXDBGPnl(td, 1,
"TEST: active receive event delivery " 1721 "(SEND success/REPLY failure)\n");
1758 NLXDBGPnl(td, 1,
"TEST: active receive event delivery " 1759 "(REPLY failure/SEND success)\n");
1803 NLXDBGPnl(td, 1,
"TEST: active receive event delivery " 1804 "(SEND + UNLINK [/no REPLY])\n");
1839 NLXDBGPnl(td,1,
"TEST: active receive event delivery (UNLINK)\n");
1880 NLXDBGPnl(td, 1,
"TEST: active send event delivery\n");
1915 NLXDBGPnl(td, 1,
"TEST: active send event delivery (SEND failed)\n");
1951 NLXDBGPnl(td, 1,
"TEST: active send event delivery (UNLINK)\n");
2004 #undef UT_BUFVEC_FREE 2005 #undef UT_BUFVEC_ALLOC 2047 drv_tms_tlink_init(ktm);
2051 init_waitqueue_head(&ktm->
ktm_wq);
2067 drv_tms_tlink_fini(ktm);
2103 kd =
file->private_data;
2159 #define USER_HELPER_WAIT(id) \ 2161 ok = user_helper_wait((id)); \ 2163 goto restore_fops; \ 2246 #undef USER_HELPER_WAIT
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_segment_size(struct m0_net_domain *dom)
static void m0_atomic64_inc(struct m0_atomic64 *a)
uint64_t nqs_num_f_events
int(* _nlx_kcore_LNetMDAttach)(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
static ssize_t write_lnet_ut(struct file *file, const char __user *buffer, size_t count, loff_t *offset)
struct nlx_core_kmem_loc kd_cd_loc
static void nlx_kcore_kiov_restore_length(struct nlx_kcore_buffer *kcb)
M0_INTERNAL void m0_chan_wait(struct m0_clink *link)
static void ut_test_framework(ut_test_fw_body_t body, ut_test_fw_prestart_cb_t ps_cb, int dbg)
static int nlx_kcore_buf_passive_send(struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
#define M0_ALLOC_ARR(arr, nr)
static uint64_t nlx_kcore_hdr_data_encode_raw(uint32_t tmid, uint32_t portal)
static struct m0_net_buffer * cb_nb1
static void ut_ktest_bulk_get_event(struct nlx_kcore_buffer *kcb, unsigned mlength, int status)
static int ktest_lnet_init(void)
static struct m0_mutex ktest_mutex
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
static void ktest_core_ep_addr(void)
void m0_net_domain_fini(struct m0_net_domain *dom)
static void ut_ktest_bulk_unlink_event(struct nlx_kcore_buffer *kcb)
uint64_t nqs_num_s_events
static struct proc_dir_entry * proc_lnet_ut
static int ut_ktest_bulk_LNetGet(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
unsigned kb_kiov_orig_len
struct m0_net_buffer bufs1[UT_BUFS1]
static void ktest_buf_shape(void)
M0_INTERNAL void m0_clink_init(struct m0_clink *link, m0_chan_cb_t cb)
static size_t bev_cqueue_size(const struct nlx_core_bev_cqueue *q)
#define EXP_SEG_COUNT(ptr, segsize, expcount)
M0_INTERNAL void m0_clink_del_lock(struct m0_clink *link)
struct m0_bufvec nb_buffer
M0_INTERNAL int m0_net_buffer_register(struct m0_net_buffer *buf, struct m0_net_domain *dom)
static void ktest_msg_body(struct ut_data *td)
static const char * ep_addr
static void ktest_lnet_fini(void)
const struct m0_net_xprt m0_net_lnet_xprt
struct nlx_core_ep_addr cb_addr
static struct nlx_kcore_interceptable_subs nlx_kcore_iv
static size_t nlx_kcore_num_kiov_entries_for_bytes(const lnet_kiov_t *kiov, size_t kiov_len, m0_bcount_t bytes, unsigned *last_len)
static void nlx_kcore_umd_init(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, int threshold, int max_size, unsigned options, bool isLNetGetOp, lnet_md_t *umd)
static void nlx_core_match_bits_decode(uint64_t mb, uint32_t *tmid, uint64_t *counter)
static bool nlx_kcore_tm_invariant(const struct nlx_kcore_transfer_mc *kctm)
#define NLXDBG(ptr, dbg, stmt)
int(* _nlx_kcore_LNetGet)(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
#define NLX_PAGE_OFFSET(addr)
M0_INTERNAL int m0_net_tm_stats_get(struct m0_net_transfer_mc *tm, enum m0_net_queue_type qtype, struct m0_net_qstats *qs, bool reset)
static struct m0_atomic64 ut_ktest_msg_ep_create_fail
static int ut_ktest_msg_LNetMDAttach(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
static lnet_kiov_t * ut_ktest_kiov_mem_dup(const lnet_kiov_t *kiov, size_t len)
static bool ut_bufvec_alloc(struct m0_bufvec *bv, size_t n)
#define UT_BUFVEC_ALLOC(v, n)
static struct file_operations nlx_dev_file_ops
static bool ktest_user_failed
static void ut_kcore_tm_stop(struct nlx_core_transfer_mc *ctm, struct nlx_kcore_transfer_mc *ktm)
static m0_bcount_t cb_length1
static int nlx_kcore_core_dom_init(struct nlx_kcore_domain *kd, struct nlx_core_domain *cd)
static void nlx_kcore_core_dom_fini(struct nlx_kcore_domain *kd, struct nlx_core_domain *cd)
static void ut_ktest_msg_put_event(struct nlx_kcore_buffer *kcb, unsigned mlength, unsigned offset, int status, int unlinked, struct nlx_core_ep_addr *addr)
m0_bcount_t nb_min_receive_size
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
bool user_helper_wait(int id)
static enum m0_net_queue_type cb_qt1
static int ut_kcore_core_dom_init(struct nlx_kcore_domain *kd, struct nlx_core_domain *cd)
M0_INTERNAL void m0_cond_init(struct m0_cond *cond, struct m0_mutex *mutex)
static int nlx_kcore_LNetMDAttach(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
static int ut_dev_tm_stops
M0_INTERNAL int m0_bufvec_alloc(struct m0_bufvec *bufvec, uint32_t num_segs, m0_bcount_t seg_size)
static void ut_restore_subs(void)
static m0_bindex_t cb_offset1
static int ut_dev_open(struct inode *inode, struct file *file)
static void ktest_buf_reg(void)
M0_INTERNAL void m0_bufvec_free(struct m0_bufvec *bufvec)
static int ut_ktest_bulk_LNetPut(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
static void nlx_kcore_buf_deregister(struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
int ut_ktest_msg_buf_event_wait(struct nlx_core_domain *lcdom, struct nlx_core_transfer_mc *lctm, m0_time_t timeout)
static int ut_dev_cleanups
static int ut_dev_dom_inits
static void ut_save_subs(void)
static struct nlx_core_ep_addr * nlx_ep_to_core(struct m0_net_end_point *ep)
static int close_lnet_ut(struct inode *inode, struct file *file)
static int ut_ktest_msg_LNetPut(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
int(* _nlx_kcore_LNetPut)(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
M0_INTERNAL void m0_net_lnet_tm_set_debug(struct m0_net_transfer_mc *tm, unsigned dbg)
enum m0_net_queue_type nb_qtype
static int ut_ktest_bulk_LNetMDAttach(struct nlx_kcore_transfer_mc *kctm, struct nlx_core_buffer *lcbuf, struct nlx_kcore_buffer *kcb, lnet_md_t *umd)
uint32_t nb_max_receive_msgs
M0_INTERNAL int nlx_dev_close(struct inode *inode, struct file *file)
struct nlx_core_bev_cqueue ctm_bevq
#define TEST_HDR_DATA_ENCODE(_p, _t)
M0_INTERNAL void m0_cond_fini(struct m0_cond *cond)
static int nlx_kcore_buf_passive_recv(struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
static int open_lnet_ut(struct inode *inode, struct file *file)
struct m0_atomic64 ref_cnt
static int ut_dev_tm_starts
static int nlx_kcore_buf_msg_recv(struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
struct nlx_core_domain xd_core
static struct m0_stob_domain * dom
M0_INTERNAL void m0_cond_signal(struct m0_cond *cond)
static unsigned ut_ktest_kiov_count(const lnet_kiov_t *k, size_t len)
static int ut_ktest_msg_ep_create(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const struct nlx_core_ep_addr *cepa)
#define UT_BUFVEC_FREE(v)
M0_INTERNAL int m0_semaphore_init(struct m0_semaphore *semaphore, unsigned value)
M0_INTERNAL void m0_mutex_init(struct m0_mutex *mutex)
struct nlx_core_buffer xb_core
void nlx_core_ep_addr_encode(struct nlx_core_domain *lcdom, const struct nlx_core_ep_addr *cepa, char buf[M0_NET_LNET_XEP_ADDR_LEN])
static void ktest_bulk_body(struct ut_data *td)
M0_INTERNAL void m0_net_desc_free(struct m0_net_buf_desc *desc)
static void nlx_core_kmem_loc_set(struct nlx_core_kmem_loc *loc, struct page *pg, uint32_t off)
M0_INTERNAL m0_bcount_t m0_net_domain_get_max_buffer_size(struct m0_net_domain *dom)
static m0_bindex_t offset
M0_INTERNAL int m0_net_desc_copy(const struct m0_net_buf_desc *from_desc, struct m0_net_buf_desc *to_desc)
#define LNetHandleIsEqual(h1, h2)
static struct nlx_xo_interceptable_subs nlx_xo_iv
M0_INTERNAL void nlx_core_nidstrs_put(struct nlx_core_domain *lcdom, char ***nidary)
static void ktest_bulk(void)
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 struct m0_atomic64 ut_ktest_bulk_fake_LNetMDAttach
struct nlx_core_ep_addr ktm_addr
M0_INTERNAL void m0_chan_signal_lock(struct m0_chan *chan)
M0_INTERNAL m0_bcount_t m0_vec_count(const struct m0_vec *vec)
static void nlx_kcore_kiov_adjust_length(struct nlx_kcore_transfer_mc *ktm, struct nlx_kcore_buffer *kcb, lnet_md_t *umd, m0_bcount_t bytes)
static void ut_cbreset(void)
struct nlx_kcore_transfer_mc * kb_ktm
static bool ut_ktest_kiov_eq(const lnet_kiov_t *k1, const lnet_kiov_t *k2, size_t len)
static struct m0_cond ktest_cond
static bool ut_ktest_msg_LNetPut_called
static struct m0_net_end_point * cb_ep1
static bool nlx_core_ep_eq(const struct nlx_core_ep_addr *cep1, const struct nlx_core_ep_addr *cep2)
static struct nlx_kcore_ops ut_kcore_ops
static int64_t m0_atomic64_get(const struct m0_atomic64 *a)
void m0_clink_add_lock(struct m0_chan *chan, struct m0_clink *link)
int nlx_core_ep_addr_decode(struct nlx_core_domain *lcdom, const char *ep_addr, struct nlx_core_ep_addr *cepa)
struct nlx_kcore_ops * kd_drv_ops
void m0_net_end_point_put(struct m0_net_end_point *ep)
M0_INTERNAL void m0_cond_wait(struct m0_cond *cond)
#define USER_HELPER_WAIT(id)
static void ut_ktest_kiov_mem_free(lnet_kiov_t *kiov)
static struct m0_chan * ut_ktest_msg_buf_event_wait_delay_chan
M0_INTERNAL void m0_net_buffer_deregister(struct m0_net_buffer *buf, struct m0_net_domain *dom)
static void ut_kcore_core_dom_fini(struct nlx_kcore_domain *kd, struct nlx_core_domain *cd)
static struct m0_semaphore ktest_sem
static int ut_kcore_tm_start(struct nlx_kcore_domain *kd, struct nlx_core_transfer_mc *ctm, struct nlx_kcore_transfer_mc *ktm)
int m0_net_domain_init(struct m0_net_domain *dom, const struct m0_net_xprt *xprt)
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 bool ut_ktest_bulk_LNetMDAttach_called
static int nlx_dev_open(struct inode *inode, struct file *file)
static struct file_operations proc_lnet_fops
static void ut_ktest_bulk_send_event(struct nlx_kcore_buffer *kcb, unsigned mlength, int status, int unlinked, int threshold)
static void ktest_dev(void)
M0_INTERNAL bool m0_chan_timedwait(struct m0_clink *link, const m0_time_t abs_timeout)
M0_INTERNAL void m0_semaphore_fini(struct m0_semaphore *semaphore)
M0_INTERNAL int m0_net_buffer_add(struct m0_net_buffer *buf, struct m0_net_transfer_mc *tm)
m0_time_t m0_time_from_now(uint64_t secs, long ns)
int ut_dev_close(struct inode *inode, struct file *file)
static int nlx_kcore_buf_event_wait(struct nlx_core_transfer_mc *ctm, struct nlx_kcore_transfer_mc *ktm, m0_time_t timeout)
static bool ut_ktest_msg_LNetMDAttach_called
static int nlx_kcore_buf_active_send(struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
static int32_t cb_status1
static int start(struct m0_fom *fom)
M0_INTERNAL int nlx_core_buf_event_wait(struct nlx_core_domain *cd, struct nlx_core_transfer_mc *ctm, m0_time_t timeout)
M0_INTERNAL void m0_mutex_fini(struct m0_mutex *mutex)
M0_INTERNAL bool m0_cond_timedwait(struct m0_cond *cond, const m0_time_t abs_timeout)
static bool ut_ktest_bulk_LNetPut_called
static ssize_t read_lnet_ut(struct file *file, char __user *buffer, size_t len, loff_t *offset)
M0_INTERNAL int32_t m0_net_domain_get_max_buffer_segments(struct m0_net_domain *dom)
static int nlx_kcore_buf_msg_send(struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
enum m0_net_queue_type cb_qtype
struct m0_net_buf_desc nb_desc
static bool nlx_core_tm_invariant(const struct nlx_core_transfer_mc *lctm)
M0_INTERNAL void m0_semaphore_down(struct m0_semaphore *semaphore)
static struct m0_atomic64 ut_ktest_msg_buf_event_wait_stall
static void ut_ktest_bulk_put_event(struct nlx_kcore_buffer *kcb, unsigned mlength, int status)
M0_INTERNAL void m0_semaphore_up(struct m0_semaphore *semaphore)
static int ut_dev_dom_finis
static bool ut_chan_timedwait(struct m0_clink *link, uint32_t secs)
static bool nlx_core_kmem_loc_is_empty(const struct nlx_core_kmem_loc *loc)
struct m0_tl ktm_drv_bevs
int(* ko_dom_init)(struct nlx_kcore_domain *kd, struct nlx_core_domain *cd)
struct nlx_core_kmem_loc ktm_ctm_loc
static void ut_ktest_ack_event(struct nlx_kcore_buffer *kcb)
static struct m0_net_end_point * ut_ktest_msg_LNetPut_ep
static int nlx_kcore_buf_active_recv(struct nlx_kcore_transfer_mc *ktm, struct nlx_core_buffer *cb, struct nlx_kcore_buffer *kb)
static unsigned cb_called1
static void ktest_enc_dec(void)
int(* _nlx_core_buf_event_wait)(struct nlx_core_domain *lcdom, struct nlx_core_transfer_mc *lctm, m0_time_t timeout)
M0_INTERNAL int m0_net_end_point_create(struct m0_net_end_point **epp, struct m0_net_transfer_mc *tm, const char *addr)
static void ut_ktest_bulk_reply_event(struct nlx_kcore_buffer *kcb, unsigned mlength, int status, int unlinked, int threshold)
static struct m0_addb2_frame_header last
M0_INTERNAL int nlx_core_nidstrs_get(struct nlx_core_domain *lcdom, char ***nidary)
static void ktest_msg(void)
static bool nlx_kcore_domain_invariant(const struct nlx_kcore_domain *kd)
static void m0_atomic64_set(struct m0_atomic64 *a, int64_t num)
struct m0_net_end_point * nb_ep
static void nlx_kcore_eq_cb(lnet_event_t *event)
struct nlx_core_transfer_mc xtm_core
static int nlx_kcore_LNetMDUnlink(struct nlx_kcore_transfer_mc *kctm, struct nlx_kcore_buffer *kcb)
static bool ut_ktest_bulk_LNetGet_called
#define NLXDBGPnl(ptr, dbg, fmt,...)
static void ut_ktest_msg_send_event(struct nlx_kcore_buffer *kcb, unsigned mlength, int status)