Whamcloud - gitweb
LU-1425 build: make Lustre build ready for gcov
[fs/lustre-release.git] / lnet / lnet / api-ni.c
index bdff15c..0a0b8a9 100644 (file)
@@ -44,6 +44,7 @@
 #endif
 
 lnet_t      the_lnet;                           /* THE state of the network */
+EXPORT_SYMBOL(the_lnet);
 
 #ifdef __KERNEL__
 
@@ -368,6 +369,7 @@ lnet_register_lnd (lnd_t *lnd)
 
         LNET_MUTEX_UNLOCK(&the_lnet.ln_lnd_mutex);
 }
+EXPORT_SYMBOL(lnet_register_lnd);
 
 void
 lnet_unregister_lnd (lnd_t *lnd)
@@ -383,6 +385,7 @@ lnet_unregister_lnd (lnd_t *lnd)
 
         LNET_MUTEX_UNLOCK(&the_lnet.ln_lnd_mutex);
 }
+EXPORT_SYMBOL(lnet_unregister_lnd);
 
 void
 lnet_counters_get(lnet_counters_t *counters)
@@ -837,6 +840,19 @@ lnet_net2ni_locked(__u32 net, int cpt)
        return NULL;
 }
 
+lnet_ni_t *
+lnet_net2ni(__u32 net)
+{
+       lnet_ni_t *ni;
+
+       lnet_net_lock(0);
+       ni = lnet_net2ni_locked(net, 0);
+       lnet_net_unlock(0);
+
+       return ni;
+}
+EXPORT_SYMBOL(lnet_net2ni);
+
 static unsigned int
 lnet_nid_cpt_hash(lnet_nid_t nid, unsigned int number)
 {
@@ -1338,9 +1354,6 @@ LNetInit(void)
 #else
         /* Register LNDs
          * NB the order here determines default 'networks=' order */
-# ifdef CRAY_XT3
-        LNET_REGISTER_ULND(the_ptllnd);
-# endif
 # ifdef HAVE_LIBPTHREAD
         LNET_REGISTER_ULND(the_tcplnd);
 # endif
@@ -1348,6 +1361,7 @@ LNetInit(void)
         lnet_register_lnd(&the_lolnd);
         return 0;
 }
+EXPORT_SYMBOL(LNetInit);
 
 /**
  * Finalize LNet library.
@@ -1371,6 +1385,7 @@ LNetFini(void)
 
        the_lnet.ln_init = 0;
 }
+EXPORT_SYMBOL(LNetFini);
 
 /**
  * Set LNet PID and start LNet interfaces, routing, and forwarding.
@@ -1468,6 +1483,7 @@ LNetNIInit(lnet_pid_t requested_pid)
         LNET_MUTEX_UNLOCK(&the_lnet.ln_api_mutex);
         return rc;
 }
+EXPORT_SYMBOL(LNetNIInit);
 
 /**
  * Stop LNet interfaces, routing, and forwarding.
@@ -1507,6 +1523,7 @@ LNetNIFini()
         LNET_MUTEX_UNLOCK(&the_lnet.ln_api_mutex);
         return 0;
 }
+EXPORT_SYMBOL(LNetNIFini);
 
 /**
  * This is an ugly hack to export IOC_LIBCFS_DEBUG_PEER and
@@ -1626,6 +1643,7 @@ LNetCtl(unsigned int cmd, void *arg)
         }
         /* not reached */
 }
+EXPORT_SYMBOL(LNetCtl);
 
 /**
  * Retrieve the lnet_process_id_t ID of LNet interface at \a index. Note that
@@ -1666,6 +1684,7 @@ LNetGetId(unsigned int index, lnet_process_id_t *id)
        lnet_net_unlock(cpt);
        return rc;
 }
+EXPORT_SYMBOL(LNetGetId);
 
 /**
  * Print a string representation of handle \a h into buffer \a str of
@@ -1676,6 +1695,7 @@ LNetSnprintHandle(char *str, int len, lnet_handle_any_t h)
 {
         snprintf(str, len, LPX64, h.cookie);
 }
+EXPORT_SYMBOL(LNetSnprintHandle);
 
 static int
 lnet_create_ping_info(void)