Whamcloud - gitweb
LU-16548 lnet: report actual timeout used by lnd
[fs/lustre-release.git] / lnet / klnds / gnilnd / gnilnd.h
index 7c335e2..bb1ccd7 100644 (file)
@@ -898,6 +898,13 @@ extern void kgnilnd_destroy_conn(kgn_conn_t *conn);
 extern int _kgnilnd_schedule_conn(kgn_conn_t *conn, const char *caller, int line, int refheld, int lock_held);
 extern int _kgnilnd_schedule_delay_conn(kgn_conn_t *conn);
 
+static inline int kgnilnd_timeout(void)
+{
+       return *kgnilnd_tunables.kgn_timeout ?
+              *kgnilnd_tunables.kgn_timeout :
+              lnet_get_lnd_timeout();
+}
+
 /* Macro wrapper for _kgnilnd_schedule_conn. This will store the function
  * and the line of the calling function to allow us to debug problematic
  * schedule calls in the future without the programmer having to mark