From c54bf3faa29f576ceb47aa09531cd1456c450994 Mon Sep 17 00:00:00 2001 From: Gregoire Pichon Date: Tue, 13 Dec 2016 14:41:42 +0100 Subject: [PATCH] LU-8932 lnet: define new network driver ptl4lnd 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 Change-Id: I38e505916899dc7f01b3ad0372c9f068fa06f308 Reviewed-on: https://review.whamcloud.com/24768 Tested-by: Jenkins Reviewed-by: Doug Oucharek Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: James Simmons --- libcfs/libcfs/util/nidstrings.c | 12 ++++++++++++ lnet/include/lnet/nidstr.h | 1 + lnet/lnet/nidstrings.c | 10 ++++++++++ lnet/utils/portals.c | 28 +++++++++++++++------------- lustre/utils/gss/lsupport.c | 1 + 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/libcfs/libcfs/util/nidstrings.c b/libcfs/libcfs/util/nidstrings.c index 6dae2a5..8c4e495 100644 --- a/libcfs/libcfs/util/nidstrings.c +++ b/libcfs/libcfs/util/nidstrings.c @@ -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 } }; diff --git a/lnet/include/lnet/nidstr.h b/lnet/include/lnet/nidstr.h index d413d15..2690bac 100644 --- a/lnet/include/lnet/nidstr.h +++ b/lnet/include/lnet/nidstr.h @@ -49,6 +49,7 @@ enum { MXLND = 12, GNILND = 13, GNIIPLND = 14, + PTL4LND = 15, }; struct list_head; diff --git a/lnet/lnet/nidstrings.c b/lnet/lnet/nidstrings.c index 4c9fbd9..f97b464 100644 --- a/lnet/lnet/nidstrings.c +++ b/lnet/lnet/nidstrings.c @@ -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); diff --git a/lnet/utils/portals.c b/lnet/utils/portals.c index fd86a14..51edc82 100644 --- a/lnet/utils/portals.c +++ b/lnet/utils/portals.c @@ -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) { diff --git a/lustre/utils/gss/lsupport.c b/lustre/utils/gss/lsupport.c index dbe14de..121a589 100644 --- a/lustre/utils/gss/lsupport.c +++ b/lustre/utils/gss/lsupport.c @@ -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])) -- 1.8.3.1