Whamcloud - gitweb
LU-19010 lnet: Define BXI3LND network type 56/59256/8
authorSylvain Goudeau <sylvain.goudeau@eviden.com>
Thu, 15 May 2025 08:51:58 +0000 (10:51 +0200)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:07:26 +0000 (04:07 +0000)
Define the BXI3LND network type. This reserves the network type number
for future implementation and allows creation of bxi3 peers and
adding routes to bxi3 peers.

Test-Parameters: trivial
Signed-off-by: Sylvain Goudeau <sylvain.goudeau@eviden.com>
Change-Id: I0b15da1c3be7873fecebba926c60214663b8a091
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59256
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/util/nidstrings.c
lnet/include/uapi/linux/lnet/nidstr.h
lnet/lnet/nidstrings.c
lustre/tests/sanity-lnet.sh

index 196e398..326c5bd 100644 (file)
@@ -720,7 +720,19 @@ static struct netstrfns libcfs_netstrfns[] = {
                .nf_match_addr          = libcfs_num_match,
                .nf_min_max             = cfs_num_min_max,
                .nf_expand_addrrange    = libcfs_num_addr_range_expand
-       }
+       },
+       {
+               .nf_type                = BXI3LND,
+               .nf_name                = "bxi3f",
+               .nf_modname             = "kbxi3lnd",
+               .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_min_max             = cfs_num_min_max,
+               .nf_expand_addrrange    = libcfs_num_addr_range_expand
+       },
 };
 
 static const size_t libcfs_nnetstrfns =
index d67f1d1..9cb0cfd 100644 (file)
@@ -47,6 +47,7 @@ enum {
        KFILND          = 16, /* HPE Kernel Fabric Interface          */
        TOFULND         = 17, /* Fujitsu Torus Fusion                 */
        EFALND          = 18, /* Amazon Elastic Fabric Adapter        */
+       BXI3LND         = 19, /* Bull BXIv3 Fabric Interface          */
        /* Please email adilger@whamcloud.com and lustre-devel@lists.lustre.org
         * to reserve new LND numbers before they are used anywhere.  This only
         * takes a few minutes, and will save everyone a lot of grief later.
index 07ad3a2..2d9d157 100644 (file)
@@ -1399,6 +1399,16 @@ static struct netstrfns libcfs_netstrfns[] = {
          .nf_print_addrlist    = libcfs_num_addr_range_print,
          .nf_match_addr        = libcfs_num_match
        },
+       {
+         .nf_type              = BXI3LND,
+         .nf_name              = "bxi3f",
+         .nf_modname           = "kbxi3lnd",
+         .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
+       },
 };
 
 static const size_t libcfs_nnetstrfns = ARRAY_SIZE(libcfs_netstrfns);
index af1274f..e5ddfb1 100755 (executable)
@@ -176,7 +176,7 @@ validate_nid() {
 
        local num_re='[0-9]+'
 
-       if [[ $net =~ (gni|kfi)[0-9]* ]]; then
+       if [[ $net =~ (gni|kfi|bxi3f)[0-9]* ]]; then
                [[ $addr =~ ${num_re} ]] && rc=0
        elif [[ $net =~ tcp[0-9]* ]]; then
                if ip_is_v4 "$addr" || ip_is_v6 "$addr"; then
@@ -457,6 +457,8 @@ peer:
         - nid: 10@gni
         - nid: 6@kfi
         - nid: 10@kfi
+        - nid: 6@bxi3f
+        - nid: 10@bxi3f
 EOF
        append_global_yaml
 
@@ -464,6 +466,7 @@ EOF
        nid_expr+=",6.6.[1-4/2].[0-6/3]@o2ib"
        nid_expr+=",[6-12/4]@gni"
        nid_expr+=",[6-12/4]@kfi"
+       nid_expr+=",[6-12/4]@bxi3f"
 
        compare_peer_add "6.6.6.6@tcp" "${nid_expr}"
 }
@@ -527,9 +530,22 @@ test_7() {
                error "Peer add failed $?"
        compare_peer_del "7@kfi"
 
-       echo "Delete peer that has tcp, o2ib, gni and kfi nids"
-       do_lnetctl peer add --prim_nid 7@gni \
-               --nid [8-12]@gni,7.7.7.[1-4]@tcp,7.7.7.[5-9]@o2ib,[1-5]@kfi ||
+       echo "Delete peer with single nid (bxi3f)"
+       do_lnetctl peer add --prim_nid 7@bxi3f || error "Peer add failed $?"
+       compare_peer_del "7@bxi3f"
+
+       echo "Delete peer that has multiple nids (bxi3f)"
+       do_lnetctl peer add --prim_nid 7@bxi3f --nid [8-12]@bxi3f ||
+               error "Peer add failed $?"
+       compare_peer_del "7@bxi3f"
+
+       echo "Delete peer that has tcp, o2ib, gni, kfi and bxi3f nids"
+       local nid_expr="[8-12]@gni"
+       nid_expr+=",7.7.7.[1-4]@tcp"
+       nid_expr+=",7.7.7.[5-9]@o2ib"
+       nid_expr+=",[1-5]@kfi"
+       nid_expr+=",[3-7]@bxi3f"
+       do_lnetctl peer add --prim_nid 7@gni --nid "${nid_expr}" ||
                error "Peer add failed $?"
        compare_peer_del "7@gni"
 
@@ -667,7 +683,7 @@ create_nid() {
        local num="$1"
        local net="$2"
 
-       if [[ $net =~ gni* ]] || [[ $net =~ kfi* ]]; then
+       if [[ $net =~ (gni|kfi|bxi3f) ]]; then
                echo "${num}@${net}"
        else
                echo "${num}.${num}.${num}.${num}@${net}"