X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fportals%2Fportals%2Fapi-init.c;h=e41bad8668b37ec99108fbf3b2fab442d5c7a27a;hp=e2921ac50ee4d5c1a428ee4977aa1093b73f6a7a;hb=57e6d88a8a8d858e2d74aeefba4c764ad08cf86d;hpb=a888a27ac14736d3df8e730a3909d026d6f40f49 diff --git a/lustre/portals/portals/api-init.c b/lustre/portals/portals/api-init.c index e2921ac..e41bad8 100644 --- a/lustre/portals/portals/api-init.c +++ b/lustre/portals/portals/api-init.c @@ -26,17 +26,6 @@ #include int ptl_init; -unsigned int portal_subsystem_debug = ~0 - (S_PORTALS | S_QSWNAL | S_SOCKNAL | - S_GMNAL | S_IBNAL); -unsigned int portal_debug = (D_WARNING | D_DLMTRACE | D_ERROR | D_EMERG | D_HA | - D_RPCTRACE | D_VFSTRACE | D_MALLOC); -unsigned int portal_cerror = 1; -unsigned int portal_printk; -unsigned int portal_stack; - -#ifdef __KERNEL__ -atomic_t portal_kmemory = ATOMIC_INIT(0); -#endif int __p30_initialized; int __p30_myr_initialized; @@ -44,20 +33,20 @@ int __p30_ip_initialized; ptl_handle_ni_t __myr_ni_handle; ptl_handle_ni_t __ip_ni_handle; -int __p30_myr_timeout = 10; -int __p30_ip_timeout; - -int PtlInit(void) +int PtlInit(int *max_interfaces) { + if (max_interfaces != NULL) + *max_interfaces = NAL_ENUM_END_MARKER; if (ptl_init) return PTL_OK; + LASSERT(!strcmp(ptl_err_str[PTL_MAX_ERRNO], "PTL_MAX_ERRNO")); + ptl_ni_init(); ptl_me_init(); ptl_eq_init(); ptl_init = 1; - __p30_initialized = 1; return PTL_OK; } @@ -72,3 +61,9 @@ void PtlFini(void) ptl_ni_fini(); ptl_init = 0; } + + +void PtlSnprintHandle(char *str, int len, ptl_handle_any_t h) +{ + snprintf(str, len, "0x%lx."LPX64, h.nal_idx, h.cookie); +}