Whamcloud - gitweb
* lustre updates for recent portals HEAD changes
authoreeb <eeb>
Thu, 24 Feb 2005 11:01:55 +0000 (11:01 +0000)
committereeb <eeb>
Thu, 24 Feb 2005 11:01:55 +0000 (11:01 +0000)
     -  added vib
     -  zeroconf vib, ra
     -  lconf/lmc openib,vib changes

lustre/llite/llite_lib.c
lustre/ptlrpc/events.c
lustre/utils/lconf
lustre/utils/lmc

index 26533b8..b07838b 100644 (file)
@@ -446,14 +446,15 @@ static int lustre_process_log(struct lustre_mount_data *lmd, char *profile,
         }
 
         if (lmd->lmd_nal == SOCKNAL ||
-              lmd->lmd_nal == OPENIBNAL) {
+            lmd->lmd_nal == OPENIBNAL ||
+            lmd->lmd_nal == IIBNAL ||
+            lmd->lmd_nal == VIBNAL ||
+            lmd->lmd_nal == RANAL) {
                 PCFG_INIT(pcfg, NAL_CMD_ADD_PEER);
                 pcfg.pcfg_nal     = lmd->lmd_nal;
                 pcfg.pcfg_nid     = lmd->lmd_server_nid;
                 pcfg.pcfg_id      = lmd->lmd_server_ipaddr;
                 pcfg.pcfg_misc    = lmd->lmd_port;
-                pcfg.pcfg_size    = 8388608;
-                pcfg.pcfg_flags   = 0x4; /*share*/
                 err = libcfs_nal_cmd(&pcfg);
                 if (err <0)
                         GOTO(out, err);
@@ -533,7 +534,10 @@ out_del_uuid:
 
 out_del_conn:
         if (lmd->lmd_nal == SOCKNAL ||
-            lmd->lmd_nal == OPENIBNAL) {
+            lmd->lmd_nal == OPENIBNAL ||
+            lmd->lmd_nal == IIBNAL ||
+            lmd->lmd_nal == VIBNAL ||
+            lmd->lmd_nal == RANAL) {
                 PCFG_INIT(pcfg, NAL_CMD_DEL_PEER);
                 pcfg.pcfg_nal     = lmd->lmd_nal;
                 pcfg.pcfg_nid     = lmd->lmd_server_nid;
index 390ac5b..270351d 100644 (file)
@@ -621,6 +621,7 @@ int ptlrpc_init_portals(void)
                 {GMNAL,     "gmnal"},
                 {OPENIBNAL, "openibnal"},
                 {IIBNAL,    "iibnal"},
+                {VIBNAL,    "vibnal"},
                 {TCPNAL,    "tcpnal"},
                 {LONAL,     "lonal"},
                 {RANAL,     "ranal"},
index 883541a..3de00fd 100755 (executable)
@@ -457,24 +457,31 @@ class LCTLInterface:
         self.run(cmds)
 
     def add_peer(self, net_type, nid, hostaddr, port):
-        if net_type  in ('tcp','ra') and not config.lctl_dump:
+        if net_type  in ('tcp','openib','ra') and not config.lctl_dump:
             cmds =  """
   network %s
   add_peer %s %s %d
   quit""" % (net_type,
              nid, hostaddr, port )
             self.run(cmds)
-        elif net_type in ('openib','iib',) and not config.lctl_dump:
+        elif net_type in ('iib',) and not config.lctl_dump:
             cmds =  """
   network %s
   add_peer %s
   quit""" % (net_type,
              nid )
             self.run(cmds)
+        elif net_type in ('vib',) and not config.lctl_dump:
+            cmds =  """
+  network %s
+  add_peer %s %s
+  quit""" % (net_type,
+             nid, hostaddr )
+            self.run(cmds)
     
     def connect(self, srv):
         self.add_uuid(srv.net_type, srv.nid_uuid, srv.nid)
-        if srv.net_type  in ('tcp','openib','iib','ra') and not config.lctl_dump:
+        if srv.net_type  in ('tcp','openib','iib','vib','ra') and not config.lctl_dump:
             if srv.hostaddr[0]:
                 hostaddr = string.split(srv.hostaddr[0], '/')[0]
             self.add_peer(srv.net_type, srv.nid, hostaddr, srv.port)
@@ -541,7 +548,7 @@ class LCTLInterface:
   quit""" % (net_type,
              nid, hostaddr)
                 self.run(cmds)
-        elif net_type  in ('openib','iib','ra') and not config.lctl_dump:
+        elif net_type  in ('openib','iib','vib','ra') and not config.lctl_dump:
                 cmds =  """
   ignore_errors
   network %s
@@ -553,7 +560,7 @@ class LCTLInterface:
     # disconnect one connection
     def disconnect(self, srv):
         self.del_uuid(srv.nid_uuid)
-        if srv.net_type  in ('tcp','openib','iib','ra') and not config.lctl_dump:
+        if srv.net_type  in ('tcp','openib','iib','vib','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)
@@ -1045,7 +1052,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','ra'):
+    if net_type in ('tcp','openib','iib','vib','ra'):
         if  ':' in wildcard:
             iface, star = string.split(wildcard, ':')
             local = if2addr(iface)
@@ -1364,6 +1371,8 @@ class Network(Module):
             manager.add_portals_module("knals/openibnal", 'kopenibnal')
         if self.net_type == 'iib':
             manager.add_portals_module("knals/iibnal", 'kiibnal')
+        if self.net_type == 'vib':
+            self.add_portals_module("knals/vibnal", 'kvibnal')
         if self.net_type == 'lo':
             manager.add_portals_module("knals/lonal", 'klonal')
         if self.net_type == 'ra':
@@ -1445,7 +1454,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','ra'):
+        if not net_type in ('tcp','openib','iib','vib','ra'):
             return None
 
         # connect to target if route is to single node and this node is the gw
index 700dc40..092522b 100755 (executable)
@@ -74,7 +74,7 @@ Object creation command summary:
   --node node_name
   --nid nid
   --cluster_id 
-  --nettype tcp|elan|gm|openib|iib
+  --nettype tcp|elan|gm|openib|iib|vib|ra
   --hostaddr ip[/netmask]
   --port port
   --tcpbuf size
@@ -202,7 +202,7 @@ lmc_options = [
     ('subsystem', "Specify which Lustre subsystems have debug output recorded in the log",  PARAM),
 
     # network 
-    ('nettype', "Specify the network type. This can be tcp/elan/gm/openib/iib.", PARAM),
+    ('nettype', "Specify the network type. This can be tcp/elan/gm/openib/iib/vib/ra.", PARAM),
     ('nid', "Give the network ID, e.g ElanID/IP Address as used by portals.", PARAM),
     ('port', "Optional argument to specify the TCP port number.", PARAM, DEFAULT_PORT),
     ('hostaddr', "Optional argument to specify the host address.", PARAMLIST),
@@ -895,9 +895,9 @@ def add_net(gen, lustre, options):
     hostaddr = get_option(options, 'hostaddr')
     net_type = get_option(options, 'nettype')
 
-    if net_type in ('tcp',):
+    if net_type in ('tcp','openib','ra'):
         port = get_option_int(options, 'port')
-    elif net_type in ('elan', 'gm', 'openib','iib','lo'):
+    elif net_type in ('elan','gm','iib','vib','lo'):
         port = 0
     else:
         print "Unknown net_type: ", net_type