Whamcloud - gitweb
LU-6245 libcfs: remove typedefs in libcfs source code
[fs/lustre-release.git] / lnet / klnds / gnilnd / gnilnd.h
index 9f6b36b..6cc2ac7 100644 (file)
 #define GNILND_LASTRX(conn) (time_after(conn->gnc_last_rx, conn->gnc_last_rx_cq) \
                                ? conn->gnc_last_rx : conn->gnc_last_rx_cq)
 
+/* fmablk registration failures timeout before failing node */
+#define GNILND_REGFAILTO_DISABLE  -1
+
 /************************************************************************
  * Enum, flag and tag data
  */
@@ -485,6 +488,7 @@ typedef struct kgn_tunables {
        int     *kgn_fast_reconn;      /* fast reconnection on conn timeout */
        int     *kgn_efault_lbug;      /* LBUG on receiving an EFAULT */
        int     *kgn_max_purgatory;    /* # conns/peer to keep in purgatory */
+       int     *kgn_reg_fail_timeout; /* registration failure timeout */
        int     *kgn_thread_affinity;  /* bind scheduler threads to cpus */
        int     *kgn_thread_safe;      /* use thread safe kgni API */
 #if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
@@ -970,7 +974,7 @@ static inline int kgnilnd_trylock(struct mutex *cq_lock,
 
 static inline void *kgnilnd_vzalloc(int size)
 {
-       void *ret = __vmalloc(size, __GFP_HIGHMEM | GFP_NOFS | __GFP_ZERO,
+       void *ret = __vmalloc(size, __GFP_HIGHMEM | GFP_NOIO | __GFP_NORETRY | __GFP_ZERO,
                              PAGE_KERNEL);
        LIBCFS_ALLOC_POST(ret, size);
        return ret;
@@ -996,7 +1000,7 @@ do {                                                                          \
 #define GNIDBG_MSG(level, msg, fmt, args...)                                  \
 do {                                                                          \
        if ((level) & (D_ERROR | D_WARNING | D_NETERROR)) {                   \
-           static cfs_debug_limit_state_t cdls;                              \
+           static struct cfs_debug_limit_state cdls;                         \
            LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, level, &cdls);                \
            kgnilnd_debug_msg(&msgdata, level, &cdls, msg,                    \
                              "$$ "fmt" from %s ", ## args,                   \
@@ -1013,7 +1017,7 @@ do {                                                                          \
 #define GNIDBG_TOMSG(level, msg, fmt, args...)                                \
 do {                                                                          \
        if ((level) & (D_ERROR | D_WARNING | D_NETERROR)) {                   \
-           static cfs_debug_limit_state_t cdls;                              \
+           static struct cfs_debug_limit_state cdls;                         \
            LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, level, &cdls);                \
            kgnilnd_debug_msg(&msgdata, level, &cdls, msg,                    \
                              "$$ "fmt" ", ## args);                          \
@@ -1042,7 +1046,7 @@ do {                                                                           \
 #define GNIDBG_CONN(level, conn, fmt, args...)                                  \
 do {                                                                            \
        if ((level) & (D_ERROR | D_WARNING | D_NETERROR)) {                     \
-           static cfs_debug_limit_state_t cdls;                                \
+           static struct cfs_debug_limit_state cdls;                           \
            LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, level, &cdls);                  \
            kgnilnd_debug_conn(&msgdata, level, &cdls, conn,                    \
                               "$$ "fmt" ", ## args);                           \
@@ -1071,7 +1075,7 @@ do {                                                                           \
 #define GNIDBG_TX(level, tx, fmt, args...)                                      \
 do {                                                                            \
        if ((level) & (D_ERROR | D_WARNING | D_NETERROR)) {                     \
-           static cfs_debug_limit_state_t cdls;                                \
+           static struct cfs_debug_limit_state cdls;                           \
            LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, level, &cdls);                  \
            kgnilnd_debug_tx(&msgdata, level, &cdls, tx,                        \
                              "$$ "fmt" ", ## args);                            \