Whamcloud - gitweb
LU-8769 lnet: removal of obsolete LNDs 21/23621/6
authorSonia Sharma <sonia.sharma@intel.com>
Mon, 7 Nov 2016 17:32:00 +0000 (09:32 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 7 Feb 2017 06:12:45 +0000 (06:12 +0000)
Obsolete LNDs were already removed. commented out the name<->network
number mapping for the obsolete LNDs. Removed their initialization
from the array in nidstrings.c file and occurences of the constants
for these LNDs in other files

Signed-off-by: Sonia Sharma <sonia.sharma@intel.com>
Change-Id: I5c6ba0e88f5cabf0e875dc76bc5fccfbb16e9ab8
Reviewed-on: https://review.whamcloud.com/23621
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/libcfs/util/nidstrings.c
lnet/include/lnet/nidstr.h
lnet/lnet/api-ni.c
lnet/utils/lnetconfig/liblnetconfig.c
lnet/utils/portals.c
lustre/utils/gss/lsupport.c

index 8c4e495..18fcae2 100644 (file)
@@ -232,12 +232,6 @@ libcfs_decnum_addr2str(__u32 addr, char *str, size_t size)
        snprintf(str, size, "%u", addr);
 }
 
-static void
-libcfs_hexnum_addr2str(__u32 addr, char *str, size_t size)
-{
-       snprintf(str, size, "0x%x", addr);
-}
-
 static int
 libcfs_num_str2addr(const char *str, int nob, __u32 *addr)
 {
@@ -352,114 +346,6 @@ static struct netstrfns libcfs_netstrfns[] = {
                .nf_min_max             = cfs_ip_min_max
        },
        {
-               .nf_type                = CIBLND,
-               .nf_name                = "cib",
-               .nf_modname             = "kciblnd",
-               .nf_addr2str            = libcfs_ip_addr2str,
-               .nf_str2addr            = libcfs_ip_str2addr,
-               .nf_parse_addrlist      = cfs_ip_addr_parse,
-               .nf_print_addrlist      = libcfs_ip_addr_range_print,
-               .nf_match_addr          = cfs_ip_addr_match,
-               .nf_is_contiguous       = cfs_ip_is_contiguous,
-               .nf_min_max             = cfs_ip_min_max
-       },
-       {
-               .nf_type                = OPENIBLND,
-               .nf_name                = "openib",
-               .nf_modname             = "kopeniblnd",
-               .nf_addr2str            = libcfs_ip_addr2str,
-               .nf_str2addr            = libcfs_ip_str2addr,
-               .nf_parse_addrlist      = cfs_ip_addr_parse,
-               .nf_print_addrlist      = libcfs_ip_addr_range_print,
-               .nf_match_addr          = cfs_ip_addr_match,
-               .nf_is_contiguous       = cfs_ip_is_contiguous,
-               .nf_min_max             = cfs_ip_min_max
-       },
-       {
-               .nf_type                = IIBLND,
-               .nf_name                = "iib",
-               .nf_modname             = "kiiblnd",
-               .nf_addr2str            = libcfs_ip_addr2str,
-               .nf_str2addr            = libcfs_ip_str2addr,
-               .nf_parse_addrlist      = cfs_ip_addr_parse,
-               .nf_print_addrlist      = libcfs_ip_addr_range_print,
-               .nf_match_addr          = cfs_ip_addr_match,
-               .nf_is_contiguous       = cfs_ip_is_contiguous,
-               .nf_min_max             = cfs_ip_min_max
-       },
-       {
-               .nf_type                = VIBLND,
-               .nf_name                = "vib",
-               .nf_modname             = "kviblnd",
-               .nf_addr2str            = libcfs_ip_addr2str,
-               .nf_str2addr            = libcfs_ip_str2addr,
-               .nf_parse_addrlist      = cfs_ip_addr_parse,
-               .nf_print_addrlist      = libcfs_ip_addr_range_print,
-               .nf_match_addr          = cfs_ip_addr_match,
-               .nf_is_contiguous       = cfs_ip_is_contiguous,
-               .nf_min_max             = cfs_ip_min_max
-       },
-       {
-               .nf_type                = RALND,
-               .nf_name                = "ra",
-               .nf_modname             = "kralnd",
-               .nf_addr2str            = libcfs_ip_addr2str,
-               .nf_str2addr            = libcfs_ip_str2addr,
-               .nf_parse_addrlist      = cfs_ip_addr_parse,
-               .nf_print_addrlist      = libcfs_ip_addr_range_print,
-               .nf_match_addr          = cfs_ip_addr_match,
-               .nf_is_contiguous       = cfs_ip_is_contiguous,
-               .nf_min_max             = cfs_ip_min_max
-       },
-       {
-               .nf_type                = QSWLND,
-               .nf_name                = "elan",
-               .nf_modname             = "kqswlnd",
-               .nf_addr2str            = libcfs_decnum_addr2str,
-               .nf_str2addr            = libcfs_num_str2addr,
-               .nf_parse_addrlist      = libcfs_num_parse,
-               .nf_print_addrlist      = libcfs_num_addr_range_print,
-               .nf_match_addr          = libcfs_num_match,
-               .nf_is_contiguous       = cfs_num_is_contiguous,
-               .nf_min_max             = cfs_num_min_max
-       },
-       {
-               .nf_type                = GMLND,
-               .nf_name                = "gm",
-               .nf_modname             = "kgmlnd",
-               .nf_addr2str            = libcfs_hexnum_addr2str,
-               .nf_str2addr            = libcfs_num_str2addr,
-               .nf_parse_addrlist      = libcfs_num_parse,
-               .nf_print_addrlist      = libcfs_num_addr_range_print,
-               .nf_match_addr          = libcfs_num_match,
-               .nf_is_contiguous       = cfs_num_is_contiguous,
-               .nf_min_max             = cfs_num_min_max
-       },
-       {
-               .nf_type                = MXLND,
-               .nf_name                = "mx",
-               .nf_modname             = "kmxlnd",
-               .nf_addr2str            = libcfs_ip_addr2str,
-               .nf_str2addr            = libcfs_ip_str2addr,
-               .nf_parse_addrlist      = cfs_ip_addr_parse,
-               .nf_print_addrlist      = libcfs_ip_addr_range_print,
-               .nf_match_addr          = cfs_ip_addr_match,
-               .nf_is_contiguous       = cfs_ip_is_contiguous,
-               .nf_min_max             = cfs_ip_min_max
-       },
-       {
-               .nf_type                = PTLLND,
-               .nf_name                = "ptl",
-               .nf_modname             = "kptllnd",
-               .nf_addr2str            = libcfs_decnum_addr2str,
-               .nf_str2addr            = libcfs_num_str2addr,
-               .nf_parse_addrlist      = libcfs_num_parse,
-               .nf_print_addrlist      = libcfs_num_addr_range_print,
-               .nf_match_addr          = libcfs_num_match,
-               .nf_is_contiguous       = cfs_num_is_contiguous,
-               .nf_min_max             = cfs_num_min_max
-       },
-       {
                .nf_type                = GNILND,
                .nf_name                = "gni",
                .nf_modname             = "kgnilnd",
index 2690bac..460672e 100644 (file)
 enum {
        /* Only add to these values (i.e. don't ever change or redefine them):
         * network addresses depend on them... */
-       QSWLND          = 1,
+       /*QSWLND        = 1, removed v2_7_50                 */
        SOCKLND         = 2,
-       GMLND           = 3,
-       PTLLND          = 4,
+       /*GMLND         = 3, removed v2_0_0-rc1a-16-gc660aac */
+       /*PTLLND        = 4, removed v2_7_50                 */
        O2IBLND         = 5,
-       CIBLND          = 6,
-       OPENIBLND       = 7,
-       IIBLND          = 8,
+       /*CIBLND        = 6, removed v2_0_0-rc1a-175-gd2b8a0e */
+       /*OPENIBLND     = 7, removed v2_0_0-rc1a-175-gd2b8a0e */
+       /*IIBLND        = 8, removed v2_0_0-rc1a-175-gd2b8a0e */
        LOLND           = 9,
-       RALND           = 10,
-       VIBLND          = 11,
-       MXLND           = 12,
+       /*RALND         = 10, removed v2_7_50_0-34-g8be9e41    */
+       /*VIBLND        = 11, removed v2_0_0-rc1a-175-gd2b8a0e */
+       /*MXLND         = 12, removed v2_7_50_0-34-g8be9e41    */
        GNILND          = 13,
        GNIIPLND        = 14,
        PTL4LND         = 15,
index 0ea2e3f..84825a1 100644 (file)
@@ -1492,13 +1492,6 @@ lnet_startup_lndnet(struct lnet_net *net, struct lnet_lnd_tunables *tun)
 
                LASSERT(libcfs_isknown_lnd(lnd_type));
 
-               if (lnd_type == CIBLND || lnd_type == OPENIBLND ||
-                   lnd_type == IIBLND || lnd_type == VIBLND) {
-                       CERROR("LND %s obsoleted\n", libcfs_lnd2str(lnd_type));
-                       rc = -EINVAL;
-                       goto failed0;
-               }
-
                mutex_lock(&the_lnet.ln_lnd_mutex);
                lnd = lnet_find_lnd_by_type(lnd_type);
 
index 4600051..6aaa1a0 100644 (file)
@@ -584,17 +584,6 @@ int lustre_lnet_config_route(char *nw, char *gw, int hops, int prio,
                goto out;
        }
 
-       if (LNET_NETTYP(net) == CIBLND    ||
-           LNET_NETTYP(net) == OPENIBLND ||
-           LNET_NETTYP(net) == IIBLND    ||
-           LNET_NETTYP(net) == VIBLND) {
-               snprintf(err_str,
-                        sizeof(err_str),
-                        "\"obselete LNet type '%s'\"", libcfs_lnd2str(net));
-               rc = LUSTRE_CFG_RC_BAD_PARAM;
-               goto out;
-       }
-
        gateway_nid = libcfs_str2nid(gw);
        if (gateway_nid == LNET_NID_ANY) {
                snprintf(err_str,
@@ -678,17 +667,6 @@ int lustre_lnet_del_route(char *nw, char *gw,
                goto out;
        }
 
-       if (LNET_NETTYP(net) == CIBLND    ||
-           LNET_NETTYP(net) == OPENIBLND ||
-           LNET_NETTYP(net) == IIBLND    ||
-           LNET_NETTYP(net) == VIBLND) {
-               snprintf(err_str,
-                        sizeof(err_str),
-                        "\"obselete LNet type '%s'\"", libcfs_lnd2str(net));
-               rc = LUSTRE_CFG_RC_BAD_PARAM;
-               goto out;
-       }
-
        gateway_nid = libcfs_str2nid(gw);
        if (gateway_nid == LNET_NID_ANY) {
                snprintf(err_str,
@@ -745,17 +723,6 @@ int lustre_lnet_show_route(char *nw, char *gw, int hops, int prio, int detail,
                        goto out;
                }
 
-               if (LNET_NETTYP(net) == CIBLND    ||
-                   LNET_NETTYP(net) == OPENIBLND ||
-                   LNET_NETTYP(net) == IIBLND    ||
-                   LNET_NETTYP(net) == VIBLND) {
-                       snprintf(err_str,
-                                sizeof(err_str),
-                                "\"obsolete LNet type '%s'\"",
-                                libcfs_lnd2str(net));
-                       rc = LUSTRE_CFG_RC_BAD_PARAM;
-                       goto out;
-               }
        } else {
                /* show all routes without filtering on net */
                net = LNET_NIDNET(LNET_NID_ANY);
index cab96e3..c599740 100644 (file)
@@ -338,15 +338,6 @@ int jt_ptl_network(int argc, char **argv)
                return -1;
        }
 
-       if (LNET_NETTYP(net) == QSWLND || LNET_NETTYP(net) == GMLND ||
-           LNET_NETTYP(net) == PTLLND || LNET_NETTYP(net) == CIBLND ||
-           LNET_NETTYP(net) == OPENIBLND || LNET_NETTYP(net) == IIBLND ||
-           LNET_NETTYP(net) == RALND || LNET_NETTYP(net) == VIBLND ||
-           LNET_NETTYP(net) == MXLND) {
-               fprintf(stderr, "Net %s obsoleted\n", libcfs_lnd2str(net));
-               return -1;
-       }
-
        g_net_set = true;
        g_net = net;
        return 0;
index 121a589..744fc27 100644 (file)
@@ -257,7 +257,7 @@ int external_nid2hostname(char *lnd, uint32_t net, uint32_t addr,
                 head++;
 
         tail = head + strlen(head);
-        if (tail <= head) {
+       if (tail <= head) {
                 printerr(0, "no output from %s\n", gethostname_ex);
                 return -1;
         }
@@ -293,14 +293,9 @@ struct convert_struct {
 
 static struct convert_struct converter[] = {
         [0]             = { "UNUSED0",  NULL},
-        [QSWLND]        = { "QSWLND",   external_nid2hostname},
         [SOCKLND]       = { "SOCKLND",  ipv4_nid2hostname },
-        [GMLND]         = { "GMLND",    external_nid2hostname},
-        [PTLLND]        = { "PTLLND",   external_nid2hostname },
         [O2IBLND]       = { "O2IBLND",  ipv4_nid2hostname },
         [LOLND]         = { "LOLND",    lolnd_nid2hostname },
-        [RALND]         = { "RALND",    external_nid2hostname },
-        [MXLND]         = { "MXLND",    external_nid2hostname },
        [PTL4LND]       = { "PTL4LND",  external_nid2hostname },
 };