Whamcloud - gitweb
LU-12511 utils: make kfilnd support a soft requirement 18/48518/5
authorJames Simmons <jsimmons@infradead.org>
Sat, 17 Sep 2022 15:45:12 +0000 (11:45 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 4 Oct 2022 19:32:45 +0000 (19:32 +0000)
The new kfilnd driver doesn't exist upstream and looks like it
will be missing upstream for sometime. Make building the code
for this new LND optional which is needed for the native Linux
Lustre client.

Test-Parameters: trivial
Change-Id: Ib17f78b12ffed95e4198d4524f5ca44aab01c010
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48518
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/autoconf/lustre-lnet.m4
lnet/utils/lnetconfig/liblnetconfig_lnd.c
lnet/utils/lnetctl.c

index 3727cc5..2c207f1 100644 (file)
@@ -714,6 +714,7 @@ AC_ARG_WITH([kfi],
                        AC_MSG_ERROR(["$with_kfi/Module.symvers does not exist"])
                ])
        ],[])
                        AC_MSG_ERROR(["$with_kfi/Module.symvers does not exist"])
                ])
        ],[])
+AC_DEFINE(HAVE_KFILND, 1, [support kfabric LND])
 AC_SUBST(KFICPPFLAGS)
 AC_SUBST(KFILND)
 AC_SUBST(EXTRA_SYMBOLS)
 AC_SUBST(KFICPPFLAGS)
 AC_SUBST(KFILND)
 AC_SUBST(EXTRA_SYMBOLS)
index 644a81c..23c0815 100644 (file)
@@ -85,6 +85,7 @@ lustre_socklnd_show_tun(struct cYAML *lndparams,
        return LUSTRE_CFG_RC_NO_ERR;
 }
 
        return LUSTRE_CFG_RC_NO_ERR;
 }
 
+#ifdef HAVE_KFILND
 static int
 lustre_kfilnd_show_tun(struct cYAML *lndparams,
                        struct lnet_ioctl_config_kfilnd_tunables *lnd_cfg)
 static int
 lustre_kfilnd_show_tun(struct cYAML *lndparams,
                        struct lnet_ioctl_config_kfilnd_tunables *lnd_cfg)
@@ -103,6 +104,7 @@ lustre_kfilnd_show_tun(struct cYAML *lndparams,
 
        return LUSTRE_CFG_RC_NO_ERR;
 }
 
        return LUSTRE_CFG_RC_NO_ERR;
 }
+#endif
 
 int
 lustre_net_show_tunables(struct cYAML *tunables,
 
 int
 lustre_net_show_tunables(struct cYAML *tunables,
@@ -148,10 +150,11 @@ lustre_ni_show_tunables(struct cYAML *lnd_tunables,
        else if (net_type == SOCKLND)
                rc = lustre_socklnd_show_tun(lnd_tunables,
                                             &lnd->lnd_tun_u.lnd_sock);
        else if (net_type == SOCKLND)
                rc = lustre_socklnd_show_tun(lnd_tunables,
                                             &lnd->lnd_tun_u.lnd_sock);
+#ifdef HAVE_KFILND
        else if (net_type == KFILND)
                rc = lustre_kfilnd_show_tun(lnd_tunables,
                                            &lnd->lnd_tun_u.lnd_kfi);
        else if (net_type == KFILND)
                rc = lustre_kfilnd_show_tun(lnd_tunables,
                                            &lnd->lnd_tun_u.lnd_kfi);
-
+#endif
        return rc;
 }
 
        return rc;
 }
 
@@ -198,6 +201,7 @@ yaml_extract_o2ib_tun(struct cYAML *tree,
 
 }
 
 
 }
 
+#ifdef HAVE_KFILND
 static void
 yaml_extract_kfi_tun(struct cYAML *tree,
                      struct lnet_ioctl_config_kfilnd_tunables *lnd_cfg)
 static void
 yaml_extract_kfi_tun(struct cYAML *tree,
                      struct lnet_ioctl_config_kfilnd_tunables *lnd_cfg)
@@ -225,6 +229,7 @@ yaml_extract_kfi_tun(struct cYAML *tree,
        lnd_cfg->lnd_auth_key =
                (auth_key) ? auth_key->cy_valueint : 0;
 }
        lnd_cfg->lnd_auth_key =
                (auth_key) ? auth_key->cy_valueint : 0;
 }
+#endif
 
 static void
 yaml_extract_sock_tun(struct cYAML *tree,
 
 static void
 yaml_extract_sock_tun(struct cYAML *tree,
@@ -252,8 +257,10 @@ lustre_yaml_extract_lnd_tunables(struct cYAML *tree,
        else if (net_type == SOCKLND)
                yaml_extract_sock_tun(tree,
                                      &tun->lnd_tun_u.lnd_sock);
        else if (net_type == SOCKLND)
                yaml_extract_sock_tun(tree,
                                      &tun->lnd_tun_u.lnd_sock);
+#ifdef HAVE_KFILND
        else if (net_type == KFILND)
                yaml_extract_kfi_tun(tree,
                                     &tun->lnd_tun_u.lnd_kfi);
        else if (net_type == KFILND)
                yaml_extract_kfi_tun(tree,
                                     &tun->lnd_tun_u.lnd_kfi);
+#endif
 }
 
 }
 
index 94ce53a..8d09520 100644 (file)
@@ -1172,12 +1172,12 @@ static int jt_add_ni(int argc, char **argv)
                        return 0;
                }
        }
                        return 0;
                }
        }
-
+#ifdef HAVE_KFILND
        if (auth_key > 0 && LNET_NETTYP(nw_descr.nw_id) == KFILND) {
                tunables.lt_tun.lnd_tun_u.lnd_kfi.lnd_auth_key = auth_key;
                found = true;
        }
        if (auth_key > 0 && LNET_NETTYP(nw_descr.nw_id) == KFILND) {
                tunables.lt_tun.lnd_tun_u.lnd_kfi.lnd_auth_key = auth_key;
                found = true;
        }
-
+#endif
        if (pto >= 0 || pc > 0 || pbc > 0 || cre > 0 || cpp > -1) {
                tunables.lt_cmn.lct_peer_timeout = pto;
                tunables.lt_cmn.lct_peer_tx_credits = pc;
        if (pto >= 0 || pc > 0 || pbc > 0 || cre > 0 || cpp > -1) {
                tunables.lt_cmn.lct_peer_timeout = pto;
                tunables.lt_cmn.lct_peer_tx_credits = pc;