Whamcloud - gitweb
* Added ranal
authoreeb <eeb>
Fri, 17 Dec 2004 15:46:50 +0000 (15:46 +0000)
committereeb <eeb>
Fri, 17 Dec 2004 15:46:50 +0000 (15:46 +0000)
20 files changed:
lustre/configure.in
lustre/liblustre/llite_lib.c
lustre/liblustre/tests/echo_test.c
lustre/portals/archdep.m4
lustre/portals/include/linux/kp30.h
lustre/portals/include/linux/libcfs.h
lustre/portals/include/portals/lltrace.h
lustre/portals/knals/Makefile.in
lustre/portals/knals/autoMakefile.am
lustre/portals/knals/gmnal/gmnal.h
lustre/portals/knals/iibnal/iibnal.h
lustre/portals/knals/lonal/lonal.h
lustre/portals/knals/openibnal/openibnal.h
lustre/portals/knals/qswnal/qswnal.h
lustre/portals/knals/socknal/socknal.h
lustre/portals/libcfs/debug.c
lustre/portals/utils/debug.c
lustre/portals/utils/portals.c
lustre/ptlrpc/events.c
lustre/utils/lconf

index 6776e74..3b1a373 100644 (file)
@@ -232,6 +232,8 @@ portals/knals/socknal/Makefile
 portals/knals/socknal/autoMakefile
 portals/knals/lonal/Makefile
 portals/knals/lonal/autoMakefile
+portals/knals/ranal/Makefile
+portals/knals/ranal/autoMakefile
 portals/libcfs/Makefile
 portals/libcfs/autoMakefile
 portals/portals/Makefile
index 352e5e3..b0c6bda 100644 (file)
@@ -48,8 +48,7 @@
 
 #include "llite_lib.h"
 
-unsigned int portal_subsystem_debug = ~0 - (S_PORTALS | S_QSWNAL | S_SOCKNAL |
-                                            S_GMNAL | S_IBNAL);
+unsigned int portal_subsystem_debug = ~0 - (S_PORTALS | S_NAL);
 
 ptl_handle_ni_t         tcpnal_ni;
 struct task_struct     *current;
index 0f4a6fc..92018a8 100644 (file)
@@ -19,8 +19,7 @@ struct ldlm_namespace;
 struct ldlm_res_id;
 struct obd_import;
 
-unsigned int portal_subsystem_debug = ~0 - (S_PORTALS | S_QSWNAL | S_SOCKNAL |
-                                            S_GMNAL | S_IBNAL);
+unsigned int portal_subsystem_debug = ~0 - (S_PORTALS | S_NAL);
 
 void *inter_module_get(char *arg)
 {
index 26e86ed..7d807da 100644 (file)
@@ -531,6 +531,35 @@ if test x$enable_modules != xno ; then
        AC_SUBST(IIBCPPFLAGS)
        AC_SUBST(IIBNAL)
 
+       #### Rapid Array
+       AC_MSG_CHECKING([if RapidArray kernel headers are present])
+       # placeholder
+       RACPPFLAGS="-I/tmp"
+       EXTRA_KCFLAGS_save="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="$EXTRA_KCFLAGS $RACPPFLAGS"
+       LUSTRE_MODULE_TRY_COMPILE(
+               [
+                       #include <linux/types.h>
+                       #include <rapl.h>
+               ],[
+                       RAP_RETURN          rc;
+                       RAP_PVOID           dev_handle;
+
+                       rc = RapkGetDeviceByIndex(0, NULL, NULL, &dev_handle);
+
+                       return rc == RAP_SUCCESS ? 0 : 1;
+               ],[
+                       AC_MSG_RESULT([yes])
+                       RANAL="ranal"
+               ],[
+                       AC_MSG_RESULT([no])
+                       RANAL=""
+                       RACPPFLAGS=""
+               ])
+       EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
+       AC_SUBST(RACPPFLAGS)
+       AC_SUBST(RANAL)
+
        # ---------- Red Hat 2.4.18 has iobuf->dovary --------------
        # But other kernels don't
 
@@ -826,6 +855,7 @@ AM_CONDITIONAL(BUILD_QSWNAL, test x$QSWNAL = "xqswnal")
 AM_CONDITIONAL(BUILD_GMNAL, test x$GMNAL = "xgmnal")
 AM_CONDITIONAL(BUILD_OPENIBNAL, test x$OPENIBNAL = "xopenibnal")
 AM_CONDITIONAL(BUILD_IIBNAL, test x$IIBNAL = "xiibnal")
+AM_CONDITIONAL(BUILD_RANAL, test x$RANAL = "xranal")
 
 # portals/utils/portals.c
 AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h])
index d49baeb..85284ce 100644 (file)
@@ -652,6 +652,7 @@ enum {
         OPENIBNAL = 7,
         IIBNAL    = 8,
         LONAL     = 9,
+        RANAL     = 10,
         NAL_ENUM_END_MARKER
 };
 
index 8f8d6fe..d8f5349 100644 (file)
@@ -94,24 +94,20 @@ struct ptldebug_header {
 #define S_RPC         0x00000100
 #define S_MGMT        0x00000200
 #define S_PORTALS     0x00000400
-#define S_SOCKNAL     0x00000800
-#define S_QSWNAL      0x00001000
-#define S_PINGER      0x00002000
-#define S_FILTER      0x00004000
-#define S_PTLBD       0x00008000
-#define S_ECHO        0x00010000
-#define S_LDLM        0x00020000
-#define S_LOV         0x00040000
-#define S_GMNAL       0x00080000
-#define S_PTLROUTER   0x00100000
-#define S_COBD        0x00200000
-#define S_IBNAL       0x00400000 /* All IB NALs */
-#define S_SM          0x00800000
-#define S_ASOBD       0x01000000
-#define S_CONFOBD     0x02000000
-#define S_LMV         0x04000000
-#define S_CMOBD       0x08000000
-#define S_LONAL       0x10000000
+#define S_NAL         0x00000800 /* ALL NALs */
+#define S_PINGER      0x00001000
+#define S_FILTER      0x00002000
+#define S_PTLBD       0x00004000
+#define S_ECHO        0x00008000
+#define S_LDLM        0x00010000
+#define S_LOV         0x00020000
+#define S_PTLROUTER   0x00040000
+#define S_COBD        0x00080000
+#define S_SM          0x00100000
+#define S_ASOBD       0x00200000
+#define S_CONFOBD     0x00400000
+#define S_LMV         0x00800000
+#define S_CMOBD       0x01000000
 /* If you change these values, please keep these files up to date...
  *    portals/utils/debug.c
  *    utils/lconf
index 5f266e2..3e01df1 100644 (file)
@@ -96,9 +96,7 @@ static inline int ltrace_start()
         rc = register_ioc_dev(PORTALS_DEV_ID, PORTALS_DEV_PATH);
 #endif
         ltrace_filter("class");
-        ltrace_filter("socknal");
-        ltrace_filter("qswnal");
-        ltrace_filter("gmnal");
+        ltrace_filter("nal");
         ltrace_filter("portals");
 
         ltrace_show("all_types");
index 610b55c..7e2e601 100644 (file)
@@ -1,4 +1,5 @@
 @BUILD_GMNAL_TRUE@subdir-m += gmnal
+@BUILD_RANAL_TRUE@subdir-m += ranal
 @BUILD_OPENIBNAL_TRUE@subdir-m += openibnal
 @BUILD_IIBNAL_TRUE@subdir-m += iibnal
 @BUILD_QSWNAL_TRUE@subdir-m += qswnal
index 2bc4b5c..4638188 100644 (file)
@@ -3,4 +3,4 @@
 # This code is issued under the GNU General Public License.
 # See the file COPYING in this distribution
 
-SUBDIRS = gmnal iibnal openibnal qswnal socknal lonal
+SUBDIRS = gmnal iibnal openibnal qswnal socknal lonal ranal
index 9c4425b..f45eab7 100644 (file)
@@ -47,7 +47,7 @@
 #include "linux/vmalloc.h"
 #include "linux/sysctl.h"
 
-#define DEBUG_SUBSYSTEM S_GMNAL
+#define DEBUG_SUBSYSTEM S_NAL
 
 #include "portals/nal.h"
 #include "portals/api.h"
index 0a25a9a..3242158 100644 (file)
@@ -48,7 +48,7 @@
 #include <linux/kmod.h>
 #include <linux/sysctl.h>
 
-#define DEBUG_SUBSYSTEM S_IBNAL
+#define DEBUG_SUBSYSTEM S_NAL
 
 #include <linux/kp30.h>
 #include <portals/p30.h>
index c6f2dda..9d3d3ff 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/uio.h>
 #include <linux/init.h>
 
-#define DEBUG_SUBSYSTEM S_LONAL
+#define DEBUG_SUBSYSTEM S_NAL
 
 #include <linux/kp30.h>
 #include <portals/p30.h>
index f0610f2..2fbd88b 100644 (file)
@@ -48,7 +48,7 @@
 #include <linux/kmod.h>
 #include <linux/sysctl.h>
 
-#define DEBUG_SUBSYSTEM S_IBNAL
+#define DEBUG_SUBSYSTEM S_NAL
 
 #include <linux/kp30.h>
 #include <portals/p30.h>
index 0b0914e..6e04752 100644 (file)
@@ -72,7 +72,7 @@
 #include <linux/sysctl.h>
 #include <asm/segment.h>
 
-#define DEBUG_SUBSYSTEM S_QSWNAL
+#define DEBUG_SUBSYSTEM S_NAL
 
 #include <linux/kp30.h>
 #include <linux/kpr.h>
index 20cd3d9..9cfe858 100644 (file)
@@ -57,7 +57,7 @@
 #include <asm/segment.h>
 #include <asm/div64.h>
 
-#define DEBUG_SUBSYSTEM S_SOCKNAL
+#define DEBUG_SUBSYSTEM S_NAL
 
 #include <linux/kp30.h>
 #include <linux/portals_compat25.h>
index cd77438..b5286fc 100644 (file)
@@ -59,8 +59,7 @@
 #include <linux/kallsyms.h>
 #endif
 
-unsigned int portal_subsystem_debug = ~0 - (S_PORTALS | S_QSWNAL | S_SOCKNAL |
-                                            S_GMNAL | S_IBNAL);
+unsigned int portal_subsystem_debug = ~0 - (S_PORTALS | S_NAL);
 EXPORT_SYMBOL(portal_subsystem_debug);
 
 unsigned int portal_debug = (D_WARNING | D_DLMTRACE | D_ERROR | D_EMERG | D_HA |
@@ -267,12 +266,14 @@ char *portals_nid2str(int nal, ptl_nid_t nid, char *str)
                 /* userspace NAL */
         case IIBNAL:
         case OPENIBNAL:
+        case RANAL:
         case SOCKNAL:
                 snprintf(str, PTL_NALFMT_SIZE, "%u:%u.%u.%u.%u",
                          (__u32)(nid >> 32), HIPQUAD(nid));
                 break;
         case QSWNAL:
         case GMNAL:
+        case LONAL:
                 snprintf(str, PTL_NALFMT_SIZE, "%u:%u",
                          (__u32)(nid >> 32), (__u32)nid);
                 break;
index 2a23630..9886a5c 100644 (file)
@@ -77,12 +77,11 @@ static int debug_mask = ~0;
 static const char *portal_debug_subsystems[] =
         {"undefined", "mdc", "mds", "osc", 
          "ost", "class", "log", "llite",
-         "rpc", "mgmt", "portals", "socknal", 
-         "qswnal", "pinger", "filter", "ptlbd", 
-         "echo", "ldlm", "lov", "gmnal",
-         "router", "cobd", "ibnal", "sm",
-         "asobd", "confobd", "lmv", "cmobd",
-         "lonal", NULL};
+         "rpc", "mgmt", "portals", "nal", 
+         "pinger", "filter", "ptlbd", "echo", 
+         "ldlm", "lov", "router", "cobd", 
+         "sm", "asobd", "confobd", "lmv", 
+         "cmobd", NULL};
 static const char *portal_debug_masks[] =
         {"trace", "inode", "super", "ext2", 
          "malloc", "cache", "info", "ioctl",
@@ -507,7 +506,7 @@ dbg_write_cmd(int fd, char *str)
 {
         int    len = strlen(str);
         int    rc  = write(fd, str, len);
-
+        
         return (rc == len ? 0 : 1);
 }
 
@@ -529,7 +528,7 @@ int jt_dbg_debug_daemon(int argc, char **argv)
                         strerror(errno));
                 return -1;
         }
-
+        
         rc = -1;
         if (strcasecmp(argv[1], "start") == 0) {
                 if (argc < 3 || argc > 4 ||
index abe3f98..00a0c4b 100644 (file)
@@ -79,6 +79,7 @@ static name2num_t nalnames[] = {
         {"openib",      OPENIBNAL},
         {"iib",         IIBNAL},
         {"lo",          LONAL},
+        {"ra",          RANAL},
 #else
         {"cray_kern_nal", CRAY_KERN_NAL},
         {"cray_user_nal", CRAY_USER_NAL},
@@ -711,10 +712,10 @@ jt_ptl_add_peer (int argc, char **argv)
         int                      port = 0;
         int                      rc;
 
-        if (!g_nal_is_compatible (argv[0], SOCKNAL, OPENIBNAL, IIBNAL, 0))
+        if (!g_nal_is_compatible (argv[0], SOCKNAL, OPENIBNAL, IIBNAL, RANAL, 0))
                 return -1;
 
-        if (g_nal_is_compatible(NULL, SOCKNAL, 0)) {
+        if (g_nal_is_compatible(NULL, SOCKNAL, RANAL, 0)) {
                 if (argc != 4) {
                         fprintf (stderr, "usage(tcp): %s nid ipaddr port\n", 
                                  argv[0]);
@@ -731,7 +732,7 @@ jt_ptl_add_peer (int argc, char **argv)
                 return -1;
         }
 
-        if (g_nal_is_compatible (NULL, SOCKNAL, 0)) {
+        if (g_nal_is_compatible (NULL, SOCKNAL, RANAL, 0)) {
                 if (ptl_parse_ipaddr (&ip, argv[2]) != 0) {
                         fprintf (stderr, "Can't parse ip addr: %s\n", argv[2]);
                         return -1;
@@ -768,7 +769,7 @@ jt_ptl_del_peer (int argc, char **argv)
         int                      argidx;
         int                      rc;
 
-        if (!g_nal_is_compatible (argv[0], SOCKNAL, OPENIBNAL, IIBNAL, 0))
+        if (!g_nal_is_compatible (argv[0], SOCKNAL, OPENIBNAL, IIBNAL, RANAL, 0))
                 return -1;
 
         if (g_nal_is_compatible(NULL, SOCKNAL, 0)) {
index 5c269d0..0f6a7c4 100644 (file)
@@ -630,6 +630,7 @@ int ptlrpc_init_portals(void)
                 {IIBNAL,    "iibnal"},
                 {TCPNAL,    "tcpnal"},
                 {LONAL,     "lonal"},
+                {RANAL,     "ranal"},
 #else
                 {CRAY_KB_ERNAL, "cray_kb_ernal"},
 #endif
index e45650d..8ae066e 100755 (executable)
@@ -104,24 +104,20 @@ subsystem_names = {
     "rpc" :          (1 << 8),
     "mgmt" :         (1 << 9),
     "portals" :      (1 << 10),
-    "socknal" :      (1 << 11),
-    "qswnal" :       (1 << 12),
-    "pinger" :       (1 << 13),
-    "filter" :       (1 << 14),
-    "ptlbd" :        (1 << 15),
-    "echo" :         (1 << 16),
-    "ldlm" :         (1 << 17),
-    "lov" :          (1 << 18),
-    "gmnal" :        (1 << 19),
-    "ptlrouter" :    (1 << 20),
-    "cobd" :         (1 << 21),
-    "ibnal" :        (1 << 22),
-    "sm" :           (1 << 23),
-    "asobd" :        (1 << 24),
-    "confobd" :      (1 << 25),
-    "lmv" :          (1 << 26),
-    "cmobd" :        (1 << 27),
-    "lonal" :        (1 << 28),
+    "nal" :          (1 << 11),
+    "pinger" :       (1 << 12),
+    "filter" :       (1 << 13),
+    "ptlbd" :        (1 << 14),
+    "echo" :         (1 << 15),
+    "ldlm" :         (1 << 16),
+    "lov" :          (1 << 17),
+    "ptlrouter" :    (1 << 18),
+    "cobd" :         (1 << 19),
+    "sm" :           (1 << 20),
+    "asobd" :        (1 << 21),
+    "confobd" :      (1 << 22),
+    "lmv" :          (1 << 23),
+    "cmobd" :        (1 << 24),
     }
 
 
@@ -453,7 +449,7 @@ class LCTLInterface:
         self.run(cmds)
 
     def add_peer(self, net_type, nid, hostaddr, port):
-        if net_type  in ('tcp',) and not config.lctl_dump:
+        if net_type  in ('tcp','ra') and not config.lctl_dump:
             cmds =  """
   network %s
   add_peer %s %s %d
@@ -537,7 +533,7 @@ class LCTLInterface:
   quit""" % (net_type,
              nid, hostaddr)
                 self.run(cmds)
-        elif net_type  in ('openib','iib',) and not config.lctl_dump:
+        elif net_type  in ('openib','iib','ra') and not config.lctl_dump:
                 cmds =  """
   ignore_errors
   network %s
@@ -549,7 +545,7 @@ class LCTLInterface:
     # disconnect one connection
     def disconnect(self, srv):
         self.del_uuid(srv.nid_uuid)
-        if srv.net_type  in ('tcp','openib','iib',) and not config.lctl_dump:
+        if srv.net_type  in ('tcp','openib','iib','ra') and not config.lctl_dump:
             if srv.hostaddr[0]:
                 hostaddr = string.split(srv.hostaddr[0], '/')[0]
             self.del_peer(srv.net_type, srv.nid, hostaddr)
@@ -976,7 +972,7 @@ def sys_get_local_nid(net_type, wildcard, cluster_id):
 def sys_get_local_address(net_type, wildcard, cluster_id):
     """Return the local address for the network type."""
     local = ""
-    if net_type in ('tcp','openib','iib',):
+    if net_type in ('tcp','openib','iib','ra'):
         if  ':' in wildcard:
             iface, star = string.split(wildcard, ':')
             local = if2addr(iface)
@@ -1227,6 +1223,8 @@ class Network(Module):
             self.add_portals_module("knals/iibnal", 'kiibnal')
         if self.net_type == 'lo':
             self.add_portals_module("knals/lonal", 'klonal')
+        if self.net_type == 'ra':
+            self.add_portals_module("knals/ranal", 'kranal')
 
     def nid_to_uuid(self, nid):
         return "NID_%s_UUID" %(nid,)
@@ -1301,7 +1299,7 @@ class RouteTable(Module):
                          lo, hi):
         # only setup connections for tcp, openib, and iib NALs
         srvdb = None
-        if not net_type in ('tcp','openib','iib',):
+        if not net_type in ('tcp','openib','iib','ra'):
             return None
 
         # connect to target if route is to single node and this node is the gw