Whamcloud - gitweb
* change init_portals to use inter_module_get() instead of
authorrread <rread>
Fri, 1 Nov 2002 23:42:36 +0000 (23:42 +0000)
committerrread <rread>
Fri, 1 Nov 2002 23:42:36 +0000 (23:42 +0000)
inter_module_get_request(), becuase we don't want to the kernel to load
any old nal, we want to use just the one that was loaded for us by
lconf.

* add hook for toenal

lustre/ptlrpc/events.c

index 55b35ea..38bcd9c 100644 (file)
@@ -28,7 +28,8 @@
 
 ptl_handle_eq_t request_out_eq, reply_in_eq, reply_out_eq, bulk_source_eq,
         bulk_sink_eq;
-static const ptl_handle_ni_t *socknal_nip = NULL, *qswnal_nip = NULL, *gmnal_nip = NULL;
+static const ptl_handle_ni_t *socknal_nip = NULL, *toenal_nip = NULL, 
+        *qswnal_nip = NULL, *gmnal_nip = NULL;
 
 /*
  *  Free the packet when it has gone out
@@ -227,17 +228,15 @@ int ptlrpc_init_portals(void)
         int rc;
         ptl_handle_ni_t ni;
 
-        socknal_nip = inter_module_get_request("ksocknal_ni", "ksocknal");
-        qswnal_nip = inter_module_get_request("kqswnal_ni", "kqswnal");
-        gmnal_nip = inter_module_get_request("kgmnal_ni", "kgmnal");
-
         /* Use the qswnal if it's there */
-        if (qswnal_nip != NULL)
+        if ((qswnal_nip = inter_module_get("kqswnal_ni")) != NULL)
                 ni = *qswnal_nip;
-        else if (gmnal_nip != NULL)
+        else if ((gmnal_nip = inter_module_get("kgmnal_ni")) != NULL)
                 ni = *gmnal_nip;
-        else if (socknal_nip != NULL)
+        else if ((socknal_nip = inter_module_get("ksocknal_ni")) != NULL)
                 ni = *socknal_nip;
+        else if ((toenal_nip = inter_module_get("ktoenal_ni")) != NULL)
+                ni = *toenal_nip;
         else {
                 CERROR("get_ni failed: is a NAL module loaded?\n");
                 return -EIO;