Whamcloud - gitweb
LU-16548 lnet: report actual timeout used by lnd
[fs/lustre-release.git] / lnet / utils / lnetconfig / liblnetconfig_lnd.c
index 251e7da..80673d9 100644 (file)
@@ -70,6 +70,10 @@ lustre_o2iblnd_show_tun(struct cYAML *lndparams,
                                lnd_cfg->lnd_conns_per_peer) == NULL)
                return LUSTRE_CFG_RC_OUT_OF_MEM;
 
+       if (cYAML_create_number(lndparams, "timeout",
+                               lnd_cfg->lnd_timeout) == NULL)
+               return LUSTRE_CFG_RC_OUT_OF_MEM;
+
        return LUSTRE_CFG_RC_NO_ERR;
 }
 
@@ -82,6 +86,10 @@ lustre_socklnd_show_tun(struct cYAML *lndparams,
                                lnd_cfg->lnd_conns_per_peer) == NULL)
                return LUSTRE_CFG_RC_OUT_OF_MEM;
 
+       if (cYAML_create_number(lndparams, "timeout",
+                               lnd_cfg->lnd_timeout) == NULL)
+               return LUSTRE_CFG_RC_OUT_OF_MEM;
+
        return LUSTRE_CFG_RC_NO_ERR;
 }
 
@@ -116,6 +124,17 @@ lustre_kfilnd_show_tun(struct cYAML *lndparams,
 }
 #endif
 
+static int
+lustre_gnilnd_show_tun(struct cYAML *lndparams,
+                       struct lnet_ioctl_config_gnilnd_tunables *lnd_cfg)
+{
+       if (cYAML_create_number(lndparams, "timeout",
+                               lnd_cfg->lnd_timeout) == NULL)
+               return LUSTRE_CFG_RC_OUT_OF_MEM;
+
+       return LUSTRE_CFG_RC_NO_ERR;
+}
+
 int
 lustre_net_show_tunables(struct cYAML *tunables,
                         struct lnet_ioctl_config_lnd_cmn_tunables *cmn)
@@ -167,7 +186,9 @@ lustre_ni_show_tunables(struct cYAML *lnd_tunables,
                                            &lnd->lnd_tun_u.lnd_kfi,
                                            backup);
 #endif
-
+       else if (net_type == GNILND)
+               rc = lustre_gnilnd_show_tun(lnd_tunables,
+                                           &lnd->lnd_tun_u.lnd_gni);
        return rc;
 }