35 static void nlx_print_core_ep_addr(
const char *pre,
38 NLXP(
"%s: %p nlx_core_ep_addr\n", pre, cepa);
46 nlx_print_core_buffer_event(
const char *pre,
49 NLXP(
"%s: %p nlx_core_buffer_event\n", pre, lcbev);
51 NLXP(
"\t cbe_time: %lx\n", (
unsigned long) lcbev->
cbe_time);
56 NLXP(
"\t cbe_sender: %ld %d %d %d\n",
64 nlx_print_net_buffer_event(
const char *pre,
67 NLXP(
"%s: %p m0_net_buffer_event\n", (
char*) pre, nbev);
68 NLXP(
"\t nbe_time: %lx\n", (
unsigned long) nbev->
nbe_time);
75 NLXP(
"\t nbe_ep: %s\n", (
char*)
"NULL");
80 NLXP(
"\t\t nb_flags: %lx\n", (
unsigned long) nb->
nb_flags);
84 static void nlx_print_core_buffer(
const char *pre,
87 NLXP(
"%s: %p nlx_core_buffer\n", pre, lcb);
92 NLXP(
"\t min_receive_size: %lu\n",
96 nlx_print_core_ep_addr(
"\t cb_addr", &lcb->
cb_addr);
102 static void nlx_print_core_buf_desc(
const char *pre,
105 NLXP(
"%s: %p nlx_core_buf_desc\n", pre, cbd);
111 NLXP(
"\t <checksum>: %lx\n", (
unsigned long)
189 while (num_to_alloc > 0) {
267 #define CBD_EP(f) cbd->cbd_passive_ep.cepa_ ## f 268 #define TM_EP(f) lctm->ctm_addr.cepa_ ## f 269 #define B_EP(f) lcbuf->cb_addr.cepa_ ## f 289 return __cpu_to_le64(checksum);
323 NLXDBG(lctm, 2, nlx_print_core_buf_desc(
"encode", cbd));
337 NLXDBG(lctm, 2, nlx_print_core_buf_desc(
"decode", cbd));
391 char *cp = strchr(
ep_addr,
':');
399 if (cp ==
NULL ||
n == 0 ||
n >=
sizeof nidstr)
416 if (strcmp(cp,
"*") == 0) {
static void bev_cqueue_add(struct nlx_core_bev_cqueue *q, struct nlx_core_bev_link *ql)
static uint32_t nlx_core_kmem_loc_checksum(const struct nlx_core_kmem_loc *loc)
static struct nlx_core_bev_link * bev_cqueue_get(struct nlx_core_bev_cqueue *q)
struct nlx_core_bev_link cbe_tm_link
static size_t bev_cqueue_size(const struct nlx_core_bev_cqueue *q)
static const char * ep_addr
struct nlx_core_ep_addr cb_addr
static void nlx_core_match_bits_decode(uint64_t mb, uint32_t *tmid, uint64_t *counter)
static bool nlx_core_buffer_invariant(const struct nlx_core_buffer *lcb)
#define NLXDBG(ptr, dbg, stmt)
#define container_of(ptr, type, member)
struct m0_net_buffer * nbe_buffer
struct m0_net_end_point * nbe_ep
M0_INTERNAL int nlx_core_nidstr_encode(struct nlx_core_domain *lcdom, uint64_t nid, char nidstr[M0_NET_LNET_NIDSTR_SIZE])
M0_INTERNAL void nlx_core_dom_set_debug(struct nlx_core_domain *lcdom, unsigned dbg)
static bool nlx_core_tm_is_locked(const struct nlx_core_transfer_mc *lctm)
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)
M0_INTERNAL void nlx_core_bevq_release(struct nlx_core_transfer_mc *lctm, size_t release)
struct nlx_core_ep_addr ctm_addr
return M0_ERR(-EOPNOTSUPP)
enum m0_net_queue_type nb_qtype
M0_INTERNAL void nlx_core_tm_set_debug(struct nlx_core_transfer_mc *lctm, unsigned dbg)
M0_INTERNAL int nlx_core_bevq_provision(struct nlx_core_domain *lcdom, struct nlx_core_transfer_mc *lctm, size_t need)
M0_INTERNAL bool m0_mutex_is_locked(const struct m0_mutex *mutex)
struct nlx_core_bev_cqueue ctm_bevq
m0_bcount_t cb_min_receive_size
nlx_core_opaque_ptr_t cbe_buffer_id
char * fmt(const char *format,...) __attribute__((format(printf
static bool nlx_tm_invariant(const struct m0_net_transfer_mc *tm)
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])
M0_INTERNAL bool nlx_core_buf_event_get(struct nlx_core_transfer_mc *lctm, struct nlx_core_buffer_event *lcbe)
uint32_t cb_max_operations
struct nlx_core_ep_addr cbe_sender
static uint64_t nlx_core_buf_desc_checksum(const struct nlx_core_buf_desc *cbd)
uint32_t m0_strtou32(const char *str, char **endptr, int base)
int nlx_core_ep_addr_decode(struct nlx_core_domain *lcdom, const char *ep_addr, struct nlx_core_ep_addr *cepa)
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)
#define NLX_FREE_ALIGNED_PTR(ptr)
enum m0_net_queue_type cb_qtype
static bool nlx_core_tm_invariant(const struct nlx_core_transfer_mc *lctm)
static void nlx_core_bev_free_cb(struct nlx_core_bev_link *ql)
struct m0_net_transfer_mc * xtm_tm
struct nlx_core_ep_addr cbd_passive_ep
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)
M0_INTERNAL int nlx_core_nidstr_decode(struct nlx_core_domain *lcdom, const char *nidstr, uint64_t *nid)
nlx_core_opaque_ptr_t cb_buffer_id
struct nlx_core_transfer_mc xtm_core
static uint64_t nlx_core_match_bits_encode(uint32_t tmid, uint64_t counter)