Whamcloud - gitweb
LU-2675 lnet: remove lnet/include/lnet/linux/
[fs/lustre-release.git] / lnet / include / lnet / lib-types.h
index a6e92bf..6d2bb38 100644 (file)
 #ifndef __LNET_LIB_TYPES_H__
 #define __LNET_LIB_TYPES_H__
 
-#include <lnet/linux/lib-types.h>
+#ifdef __KERNEL__
+# include <linux/uio.h>
+# include <linux/types.h>
+#else /* !__KERNEL__ */
+# define LNET_USE_LIB_FREELIST
+# include <sys/types.h>
+#endif /* __KERNEL__ */
 
 #include <libcfs/libcfs.h>
 #include <libcfs/list.h>
 #include <lnet/types.h>
+#include <lnet/lnetctl.h>
 
 #define WIRE_ATTR       __attribute__((packed))
 
@@ -207,6 +214,7 @@ typedef struct lnet_msg {
         unsigned int          msg_rtrcredit:1;    /* taken a globel router credit */
         unsigned int          msg_peerrtrcredit:1; /* taken a peer router credit */
         unsigned int          msg_onactivelist:1; /* on the activelist */
+       unsigned int          msg_rdma_get:1;
 
         struct lnet_peer     *msg_txpeer;         /* peer I'm sending to */
         struct lnet_peer     *msg_rxpeer;         /* peer I received from */
@@ -565,6 +573,11 @@ typedef struct {
        __u32                   lrn_net;
 } lnet_remotenet_t;
 
+/** lnet message has credit and can be submitted to lnd for send/receive */
+#define LNET_CREDIT_OK         0
+/** lnet message is waiting for credit */
+#define LNET_CREDIT_WAIT       1
+
 typedef struct {
        /* my free buffer pool */
        struct list_head        rbp_bufs;
@@ -778,6 +791,8 @@ typedef struct
        struct lnet_peer_table          **ln_peer_tables;
        /* failure simulation */
        struct list_head                ln_test_peers;
+       struct list_head                ln_drop_rules;
+       struct list_head                ln_delay_rules;
 
        struct list_head                ln_nis;         /* LND instances */
        /* NIs bond on specific CPT(s) */
@@ -817,6 +832,7 @@ typedef struct
 
        struct mutex                    ln_api_mutex;
        struct mutex                    ln_lnd_mutex;
+       struct mutex                    ln_delay_mutex;
 #else
 # ifndef HAVE_LIBPTHREAD
        int                             ln_api_mutex;