#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))
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 */
__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;
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) */
struct mutex ln_api_mutex;
struct mutex ln_lnd_mutex;
+ struct mutex ln_delay_mutex;
#else
# ifndef HAVE_LIBPTHREAD
int ln_api_mutex;