774 #undef PACKAGE_BUGREPORT 776 #undef PACKAGE_STRING 777 #undef PACKAGE_TARNAME 778 #undef PACKAGE_VERSION 780 #include "lustre_config.h" 781 #include "libcfs/libcfs.h" 784 #if M0_LUSTRE_VERSION < 2110 785 #include <lustre_ver.h> 787 #include <lustre/lustre_ver.h> 788 #include <lustre/lustre_idl.h> 791 #include <lustre/lustre_idl.h> 792 #if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 10, 51, 0) 793 #include "lnet/lib-types.h" 795 #include "lnet/types.h" 799 #undef PACKAGE_BUGREPORT 801 #undef PACKAGE_STRING 802 #undef PACKAGE_TARNAME 803 #undef PACKAGE_VERSION 811 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_LNET 824 #include <asm/byteorder.h> 838 static struct nlx_debug nlx_debug = {
843 #define NLXP(fmt, ...) M0_LOG(M0_DEBUG, fmt, ## __VA_ARGS__) 845 #define NLXDBG(ptr, dbg, stmt) \ 847 if ((ptr)->_debug_ >= (dbg)) { \ 848 M0_LOG(M0_DEBUG, "%s: %d:\n", (char*) __FILE__, __LINE__);\ 853 #define NLXDBGnl(ptr, dbg, stmt) \ 855 if ((ptr)->_debug_ >= (dbg)) { \ 860 #define NLXDBGP(ptr, dbg, fmt, ...) \ 862 if ((ptr)->_debug_ >= (dbg)) { \ 863 M0_LOG(M0_DEBUG, fmt, ## __VA_ARGS__); \ 867 #define NLXDBGPnl(ptr, dbg, fmt, ...) \ 869 if ((ptr)->_debug_ >= (dbg)) { \ 870 M0_LOG(M0_DEBUG, fmt, ## __VA_ARGS__); \ 876 #define NLXP(fmt, ...) 877 #define NLXDBG(ptr, dbg, stmt) do { ; } while (0) 878 #define NLXDBGnl(ptr, dbg, stmt) do { ; } while (0) 879 #define NLXDBGP(ptr, dbg, fmt, ...) do { ; } while (0) 880 #define NLXDBGPnl(ptr, dbg, fmt, ...) do { ; } while (0) 905 #ifdef LNET_PID_LUSTRE 925 #if !defined(ENABLE_SOCK_MOCK_LNET) || defined(__KERNEL__) 936 #if !defined(ENABLE_SOCK_MOCK_LNET) || defined(__KERNEL__) 947 cp1 = strchr(addr1,
':');
948 cp2 = strchr(addr2,
':');
951 return strncmp(addr1, addr2,
min32(cp1 - addr1, cp2 - addr2));
961 dp =
dom->nd_xprt_private;
972 dp =
dom->nd_xprt_private;
985 dp =
dom->nd_xprt_private;
1008 #undef M0_TRACE_SUBSYSTEM M0_INTERNAL void m0_net_lnet_dom_set_debug(struct m0_net_domain *dom, unsigned dbg)
static bool nlx_dom_invariant(const struct m0_net_domain *dom)
M0_INTERNAL void m0_mutex_unlock(struct m0_mutex *mutex)
const struct m0_net_xprt m0_net_lnet_xprt
static void nlx_core_fini(void)
M0_INTERNAL void m0_net_xprt_default_set(const struct m0_net_xprt *xprt)
struct m0_mutex m0_net_mutex
M0_INTERNAL void m0_mutex_lock(struct m0_mutex *mutex)
M0_INTERNAL int m0_net_lnet_ep_addr_net_cmp(const char *addr1, const char *addr2)
M0_INTERNAL void nlx_core_dom_set_debug(struct nlx_core_domain *lcdom, unsigned dbg)
M0_INTERNAL void m0_net_xprt_register(const struct m0_net_xprt *xprt)
M0_INTERNAL void m0_net_lnet_tm_set_debug(struct m0_net_transfer_mc *tm, unsigned dbg)
M0_INTERNAL void nlx_core_tm_set_debug(struct nlx_core_transfer_mc *lctm, unsigned dbg)
M0_INTERNAL int m0_net_lnet_ifaces_get(struct m0_net_domain *dom, char ***addrs)
#define M0_DEFAULT_NETWORK
struct nlx_core_domain xd_core
static struct m0_stob_domain * dom
static bool nlx_tm_invariant(const struct m0_net_transfer_mc *tm)
M0_INTERNAL void m0_net_lnet_ifaces_put(struct m0_net_domain *dom, char ***addrs)
M0_INTERNAL void nlx_core_nidstrs_put(struct nlx_core_domain *lcdom, char ***nidary)
M0_INTERNAL int m0_net_lnet_init(void)
M0_INTERNAL void m0_net_xprt_deregister(const struct m0_net_xprt *xprt)
static int32_t min32(int32_t a, int32_t b)
static int nlx_core_init(void)
M0_INTERNAL void m0_net_lnet_fini(void)
M0_INTERNAL int nlx_core_nidstrs_get(struct nlx_core_domain *lcdom, char ***nidary)
struct nlx_core_transfer_mc xtm_core