Whamcloud - gitweb
LU-9679 modules: convert MIN/MAX to kernel style
[fs/lustre-release.git] / lnet / selftest / conrpc.h
index 364c33f..bdceea6 100644 (file)
@@ -40,9 +40,8 @@
 #define __LST_CONRPC_H__
 
 #include <libcfs/libcfs.h>
-#include <lnet/lnet.h>
 #include <lnet/lib-types.h>
-#include <lnet/lnetst.h>
+#include <uapi/linux/lnet/lnetst.h>
 #include "rpc.h"
 #include "selftest.h"
 
@@ -50,7 +49,8 @@
 #define LST_TRANS_TIMEOUT       30
 #define LST_TRANS_MIN_TIMEOUT   3
 
-#define LST_VALIDATE_TIMEOUT(t) MIN(MAX(t, LST_TRANS_MIN_TIMEOUT), LST_TRANS_TIMEOUT)
+#define LST_VALIDATE_TIMEOUT(t)        \
+       clamp_t(int, t, LST_TRANS_MIN_TIMEOUT, LST_TRANS_TIMEOUT)
 
 #define LST_PING_INTERVAL       8
 
@@ -71,7 +71,7 @@ struct lstcon_rpc {
        /** RPC is embedded in other structure and can't free it */
        unsigned int             crp_embedded:1;
         int                      crp_status;     /* console rpc errors */
-        cfs_time_t               crp_stamp;      /* replied time stamp */
+       s64                      crp_stamp_ns;   /* replied time stamp */
 };
 
 struct lstcon_rpc_trans {