X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Fklnds%2Fo2iblnd%2Fo2iblnd.h;h=8ff3b8ce0f2257968bb941db448daa46f5a9985e;hp=9eb45788a211c4df060ca5c448145577067a2d77;hb=7c8ad11ef08f0f2f886004ae4a56f67722c16d5c;hpb=c6e4c21c4f8b04abc53c1010a697eb3ada4fb315 diff --git a/lnet/klnds/o2iblnd/o2iblnd.h b/lnet/klnds/o2iblnd/o2iblnd.h index 9eb4578..8ff3b8c 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.h +++ b/lnet/klnds/o2iblnd/o2iblnd.h @@ -34,6 +34,17 @@ * Author: Eric Barton */ +#include +#include + +#if defined(NEED_LOCKDEP_IS_HELD_DISCARD_CONST) \ + && defined(CONFIG_LOCKDEP) \ + && defined(lockdep_is_held) +#undef lockdep_is_held + #define lockdep_is_held(lock) \ + lock_is_held((struct lockdep_map *)&(lock)->dep_map) +#endif + #ifdef HAVE_COMPAT_RDMA #include @@ -41,10 +52,11 @@ #undef NEED_KTIME_GET_REAL_NS #endif +/* MOFED has its own bitmap_alloc backport */ +#define HAVE_BITMAP_ALLOC 1 + #endif -#include -#include #include #include #include @@ -79,8 +91,6 @@ #include #define IBLND_PEER_HASH_SIZE 101 /* # peer_ni lists */ -/* # scheduler loops before reschedule */ -#define IBLND_RESCHED 100 #define IBLND_N_SCHED 2 #define IBLND_N_SCHED_HIGH 4 @@ -758,6 +768,8 @@ struct kib_peer_ni { unsigned char ibp_races; /* # consecutive reconnection attempts to this peer */ unsigned int ibp_reconnected; + /* number of total active retries */ + unsigned int ibp_retries; /* errno on closing this peer_ni */ int ibp_error; /* max map_on_demand */ @@ -785,6 +797,12 @@ extern void kiblnd_hdev_destroy(struct kib_hca_dev *hdev); int kiblnd_msg_queue_size(int version, struct lnet_ni *ni); +static inline int kiblnd_timeout(void) +{ + return *kiblnd_tunables.kib_timeout ? *kiblnd_tunables.kib_timeout : + lnet_get_lnd_timeout(); +} + static inline int kiblnd_concurrent_sends(int version, struct lnet_ni *ni) { @@ -1060,7 +1078,7 @@ kiblnd_rd_frag_addr(struct kib_rdma_desc *rd, int index) return rd->rd_frags[index].rf_addr; } -static inline __u32 +static inline int kiblnd_rd_frag_size(struct kib_rdma_desc *rd, int index) { return rd->rd_frags[index].rf_nob; @@ -1217,7 +1235,7 @@ int kiblnd_post_rx(struct kib_rx *rx, int credit); int kiblnd_send(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg); int kiblnd_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg, - int delayed, unsigned int niov, struct kvec *iov, - lnet_kiov_t *kiov, unsigned int offset, unsigned int mlen, + int delayed, unsigned int niov, + struct bio_vec *kiov, unsigned int offset, unsigned int mlen, unsigned int rlen);