Whamcloud - gitweb
LU-8932 lnet: define new network driver ptl4lnd 68/24768/3
authorGregoire Pichon <gregoire.pichon@bull.net>
Tue, 13 Dec 2016 13:41:42 +0000 (14:41 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 24 Jan 2017 05:24:01 +0000 (05:24 +0000)
Assign an ID to the new network driver ptl4lnd developped by Bull
that implements a LND based on Portals 4 API. It is intended to be
used with BXI, the Bull interconnect hardware.

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Change-Id: I38e505916899dc7f01b3ad0372c9f068fa06f308
Reviewed-on: https://review.whamcloud.com/24768
Tested-by: Jenkins
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
libcfs/libcfs/util/nidstrings.c
lnet/include/lnet/nidstr.h
lnet/lnet/nidstrings.c
lnet/utils/portals.c
lustre/utils/gss/lsupport.c

index 6dae2a5..8c4e495 100644 (file)
@@ -482,6 +482,18 @@ static struct netstrfns libcfs_netstrfns[] = {
                .nf_match_addr          = cfs_ip_addr_match,
                .nf_is_contiguous       = cfs_ip_is_contiguous,
                .nf_min_max             = cfs_ip_min_max
+       },
+       {
+               .nf_type                = PTL4LND,
+               .nf_name                = "ptlf",
+               .nf_modname             = "kptl4lnd",
+               .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
        }
 };
 
index d413d15..2690bac 100644 (file)
@@ -49,6 +49,7 @@ enum {
        MXLND           = 12,
        GNILND          = 13,
        GNIIPLND        = 14,
+       PTL4LND         = 15,
 };
 
 struct list_head;
index 4c9fbd9..f97b464 100644 (file)
@@ -1013,6 +1013,16 @@ static struct netstrfns libcfs_netstrfns[] = {
          .nf_match_addr        = cfs_ip_addr_match,
          .nf_is_contiguous     = cfs_ip_is_contiguous,
          .nf_min_max           = cfs_ip_min_max },
+       { .nf_type              = PTL4LND,
+         .nf_name              = "ptlf",
+         .nf_modname           = "kptl4lnd",
+         .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},
 };
 
 static const size_t libcfs_nnetstrfns = ARRAY_SIZE(libcfs_netstrfns);
index fd86a14..51edc82 100644 (file)
@@ -594,14 +594,15 @@ jt_ptl_del_interface (int argc, char **argv)
 int
 jt_ptl_print_peers (int argc, char **argv)
 {
-        struct libcfs_ioctl_data data;
-        lnet_process_id_t        id;
+       struct libcfs_ioctl_data data;
+       lnet_process_id_t        id;
        char                     buffer[2][HOST_NAME_MAX + 1];
-        int                      index;
-        int                      rc;
+       int                      index;
+       int                      rc;
 
-       if (!g_net_is_compatible (argv[0], SOCKLND, O2IBLND, GNILND, 0))
-                return -1;
+       if (!g_net_is_compatible(argv[0], SOCKLND, O2IBLND, GNILND,
+                                PTL4LND, 0))
+               return -1;
 
         for (index = 0;;index++) {
                 LIBCFS_IOC_INIT(data);
@@ -714,14 +715,15 @@ int jt_ptl_add_peer(int argc, char **argv)
 int
 jt_ptl_del_peer (int argc, char **argv)
 {
-        struct libcfs_ioctl_data data;
-        lnet_nid_t               nid = LNET_NID_ANY;
-        lnet_pid_t               pid = LNET_PID_ANY;
-        __u32                    ip = 0;
-        int                      rc;
+       struct libcfs_ioctl_data data;
+       lnet_nid_t               nid = LNET_NID_ANY;
+       lnet_pid_t               pid = LNET_PID_ANY;
+       __u32                    ip = 0;
+       int                      rc;
 
-       if (!g_net_is_compatible(argv[0], SOCKLND, O2IBLND, GNILND, 0))
-                return -1;
+       if (!g_net_is_compatible(argv[0], SOCKLND, O2IBLND, GNILND,
+                                PTL4LND, 0))
+               return -1;
 
         if (g_net_is_compatible(NULL, SOCKLND, 0)) {
                 if (argc > 3) {
index dbe14de..121a589 100644 (file)
@@ -301,6 +301,7 @@ static struct convert_struct converter[] = {
         [LOLND]         = { "LOLND",    lolnd_nid2hostname },
         [RALND]         = { "RALND",    external_nid2hostname },
         [MXLND]         = { "MXLND",    external_nid2hostname },
+       [PTL4LND]       = { "PTL4LND",  external_nid2hostname },
 };
 
 #define LND_MAX         (sizeof(converter) / sizeof(converter[0]))