From c9878053d19785494d94a88794e6b3f4e0387a46 Mon Sep 17 00:00:00 2001
From: eeb <eeb>
Date: Fri, 17 Dec 2004 14:57:22 +0000
Subject: [PATCH] *   fixed ranal lconf support

---
 lnet/utils/portals.c           | 8 ++++----
 lustre/portals/utils/portals.c | 8 ++++----
 lustre/utils/lconf             | 6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/lnet/utils/portals.c b/lnet/utils/portals.c
index 29717fa83f..00a0c4b44d 100644
--- a/lnet/utils/portals.c
+++ b/lnet/utils/portals.c
@@ -712,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]);
@@ -732,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;
@@ -769,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)) {
diff --git a/lustre/portals/utils/portals.c b/lustre/portals/utils/portals.c
index 29717fa83f..00a0c4b44d 100644
--- a/lustre/portals/utils/portals.c
+++ b/lustre/portals/utils/portals.c
@@ -712,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]);
@@ -732,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;
@@ -769,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)) {
diff --git a/lustre/utils/lconf b/lustre/utils/lconf
index 2310d265e4..b55da4f8cb 100755
--- a/lustre/utils/lconf
+++ b/lustre/utils/lconf
@@ -457,7 +457,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
@@ -541,7 +541,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
@@ -553,7 +553,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)
-- 
GitLab