[lustre-devel] [PATCH 17/22] lnet: Add lnet_lnd_timeout to sysfs

James Simmons jsimmons at infradead.org
Tue Jun 2 17:59:56 PDT 2020


From: Chris Horn <hornc at cray.com>

Allow lnet_lnd_timeout to be read (only) from sysfs.

WC-bug-id: https://jira.whamcloud.com/browse/LU-13510
Lustre-commit: 17802b329cdea ("LU-13510 lnet: Add lnet_lnd_timeout to sysfs")
Signed-off-by: Chris Horn <hornc at cray.com>
Reviewed-on: https://review.whamcloud.com/38482
Reviewed-by: Serguei Smirnov <ssmirnov at whamcloud.com>
Reviewed-by: Amir Shehata <ashehata at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 include/linux/lnet/lib-lnet.h | 1 +
 net/lnet/lnet/router_proc.c   | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/include/linux/lnet/lib-lnet.h b/include/linux/lnet/lib-lnet.h
index a7825f9..def0923 100644
--- a/include/linux/lnet/lib-lnet.h
+++ b/include/linux/lnet/lib-lnet.h
@@ -417,6 +417,7 @@ struct lnet_ni *
 
 extern unsigned int lnet_transaction_timeout;
 extern unsigned int lnet_retry_count;
+extern unsigned int lnet_lnd_timeout;
 extern unsigned int lnet_numa_range;
 extern unsigned int lnet_health_sensitivity;
 extern unsigned int lnet_recovery_interval;
diff --git a/net/lnet/lnet/router_proc.c b/net/lnet/lnet/router_proc.c
index 180bbde..7fe8d33 100644
--- a/net/lnet/lnet/router_proc.c
+++ b/net/lnet/lnet/router_proc.c
@@ -881,6 +881,13 @@ static int proc_lnet_portal_rotor(struct ctl_table *table, int write,
 		.proc_handler	= &proc_lnet_portal_rotor,
 	},
 	{
+		.procname	= "lnet_lnd_timeout",
+		.data		= &lnet_lnd_timeout,
+		.maxlen		= sizeof(lnet_lnd_timeout),
+		.mode		= 0444,
+		.proc_handler	= &proc_dointvec,
+	},
+	{
 	}
 };
 
-- 
1.8.3.1



More information about the lustre-devel mailing list