diff mbox series

[17/22] lnet: Add lnet_lnd_timeout to sysfs

Message ID 1591146001-27171-18-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: OpenSFS backport patches for May 29 2020 | expand

Commit Message

James Simmons June 3, 2020, 12:59 a.m. UTC
From: Chris Horn <hornc@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@cray.com>
Reviewed-on: https://review.whamcloud.com/38482
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 include/linux/lnet/lib-lnet.h | 1 +
 net/lnet/lnet/router_proc.c   | 7 +++++++
 2 files changed, 8 insertions(+)
diff mbox series

Patch

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,
+	},
+	{
 	}
 };