*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
cfs_time_t fps_next_retry;
} kib_fmr_poolset_t;
+#ifndef HAVE_IB_RDMA_WR
+struct ib_rdma_wr {
+ struct ib_send_wr wr;
+};
+#endif
+
struct kib_fast_reg_descriptor { /* For fast registration */
struct list_head frd_list;
- struct ib_send_wr frd_inv_wr;
- struct ib_send_wr frd_fastreg_wr;
- struct ib_mr *frd_mr;
+ struct ib_rdma_wr frd_inv_wr;
+#ifdef HAVE_IB_MAP_MR_SG
+ struct ib_reg_wr frd_fastreg_wr;
+#else
+ struct ib_rdma_wr frd_fastreg_wr;
struct ib_fast_reg_page_list *frd_frpl;
+#endif
+ struct ib_mr *frd_mr;
bool frd_valid;
};
* The second that peers are pulled out from \a kib_reconn_wait
* for reconnection.
*/
- unsigned int kib_reconn_sec;
+ time64_t kib_reconn_sec;
/* connection daemon sleeps here */
wait_queue_head_t kib_connd_waitq;
spinlock_t kib_connd_lock; /* serialise */
/* # send work items */
int tx_nwrq;
/* send work items... */
- struct ib_send_wr *tx_wrq;
+ struct ib_rdma_wr *tx_wrq;
/* ...and their memory */
struct ib_sge *tx_sge;
/* rdma descriptor */
unsigned short ibp_connecting;
/* reconnect this peer later */
unsigned short ibp_reconnecting:1;
+ /* counter of how many times we triggered a conn race */
+ unsigned char ibp_races;
/* # consecutive reconnection attempts to this peer */
unsigned int ibp_reconnected;
/* errno on closing this peer */
struct lnet_ioctl_config_o2iblnd_tunables *tunables;
int mod;
- tunables = &ni->ni_lnd_tunables->lt_tun_u.lt_o2ib;
+ tunables = &ni->ni_lnd_tunables.lnd_tun_u.lnd_o2ib;
mod = tunables->lnd_map_on_demand;
return mod != 0 ? mod : IBLND_MAX_RDMA_FRAGS;
}
struct lnet_ioctl_config_o2iblnd_tunables *tunables;
int concurrent_sends;
- tunables = &ni->ni_lnd_tunables->lt_tun_u.lt_o2ib;
+ tunables = &ni->ni_lnd_tunables.lnd_tun_u.lnd_o2ib;
concurrent_sends = tunables->lnd_concurrent_sends;
if (version == IBLND_MSG_VERSION_1) {
struct lnet_ioctl_config_o2iblnd_tunables *tunables;
LASSERT(conn->ibc_state >= IBLND_CONN_ESTABLISHED);
- tunables = &ni->ni_lnd_tunables->lt_tun_u.lt_o2ib;
+ tunables = &ni->ni_lnd_tunables.lnd_tun_u.lnd_o2ib;
if (conn->ibc_outstanding_credits <
IBLND_CREDITS_HIGHWATER(tunables, conn->ibc_version) &&
void kiblnd_pool_free_node(kib_pool_t *pool, struct list_head *node);
struct list_head *kiblnd_pool_alloc_node(kib_poolset_t *ps);
-int kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, __u64 *pages, int npages,
- __u32 nob, __u64 iov, bool is_rx, kib_fmr_t *fmr);
+int kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, kib_tx_t *tx,
+ kib_rdma_desc_t *rd, __u32 nob, __u64 iov,
+ kib_fmr_t *fmr);
void kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status);
int kiblnd_tunables_setup(struct lnet_ni *ni);
bool kiblnd_reconnect_peer(kib_peer_t *peer);
void kiblnd_destroy_dev (kib_dev_t *dev);
void kiblnd_unlink_peer_locked (kib_peer_t *peer);
-kib_peer_t *kiblnd_find_peer_locked (lnet_nid_t nid);
+kib_peer_t *kiblnd_find_peer_locked(struct lnet_ni *ni, lnet_nid_t nid);
int kiblnd_close_stale_conns_locked (kib_peer_t *peer,
int version, __u64 incarnation);
int kiblnd_close_peer_conns_locked (kib_peer_t *peer, int why);