socklnd - any kernel supported by Lustre,
qswlnd - Qsnet kernel modules 5.20 and later,
openiblnd - IbGold 1.8.2,
- o2iblnd - OFED 1.1 and 1.2,
+ o2iblnd - OFED 1.1 and 1.2.0, 1.2.5
viblnd - Voltaire ibhost 3.4.5 and later,
ciblnd - Topspin 3.2.0,
iiblnd - Infiniserv 3.3 + PathBits patch,
socklnd - any kernel supported by Lustre,
qswlnd - Qsnet kernel modules 5.20 and later,
openiblnd - IbGold 1.8.2,
- o2iblnd - OFED 1.1 and 1.2,
+ o2iblnd - OFED 1.1 and 1.2.0, 1.2.5.
viblnd - Voltaire ibhost 3.4.5 and later,
ciblnd - Topspin 3.2.0,
iiblnd - Infiniserv 3.3 + PathBits patch,
EXTRA_LNET_INCLUDE="$O2IBCPPFLAGS $EXTRA_LNET_INCLUDE"
LB_LINUX_TRY_COMPILE([
#include <linux/version.h>
+ #include <linux/pci.h>
#if !HAVE_GFP_T
typedef int gfp_t;
#endif
O2IBCPPFLAGS=""
])
+# version checking is a hack and isn't reliable, we need verify it
+# with each new ofed release
+
IB_DMA_MAP="`grep -c ib_dma_map_single ${O2IBPATH}/include/rdma/ib_verbs.h`"
if test "$IB_DMA_MAP" != 0 ; then
- IBLND_OFED_VERSION="102"
+ IB_COMP_VECT="`grep -c comp_vector ${O2IBPATH}/include/rdma/ib_verbs.h`"
+ if test "$IB_COMP_VECT" != 0 ; then
+ IBLND_OFED_VERSION="1025"
+ else
+ IBLND_OFED_VERSION="1020"
+ fi
else
- IBLND_OFED_VERSION="101"
+ IBLND_OFED_VERSION="1010"
fi
AC_DEFINE_UNQUOTED(IBLND_OFED_VERSION, $IBLND_OFED_VERSION,
}
}
+#if (IBLND_OFED_VERSION == 1025)
+ cq = ib_create_cq(cmid->device,
+ kiblnd_cq_completion, kiblnd_cq_event, conn,
+ IBLND_CQ_ENTRIES(), 0);
+#else
cq = ib_create_cq(cmid->device,
kiblnd_cq_completion, kiblnd_cq_event, conn,
IBLND_CQ_ENTRIES());
+#endif
if (!IS_ERR(cq)) {
conn->ibc_cq = cq;
} else {
#include <linux/kmod.h>
#include <linux/sysctl.h>
#include <linux/random.h>
+#include <linux/pci.h>
#include <net/sock.h>
#include <linux/in.h>
}
#endif
-#if (IBLND_OFED_VERSION == 102)
+#if (IBLND_OFED_VERSION == 1020) || (IBLND_OFED_VERSION == 1025)
static inline __u64 kiblnd_dma_map_single(struct ib_device *dev,
void *msg, size_t size,
#define KIBLND_CONN_PARAM(e) ((e)->param.conn.private_data)
#define KIBLND_CONN_PARAM_LEN(e) ((e)->param.conn.private_data_len)
-#elif (IBLND_OFED_VERSION == 101)
+#elif (IBLND_OFED_VERSION == 1010)
static inline dma_addr_t kiblnd_dma_map_single(struct ib_device *dev,
void *msg, size_t size,
kiblnd_connect_peer (kib_peer_t *peer)
{
struct rdma_cm_id *cmid;
- struct sockaddr_in sockaddr;
+ kib_net_t *net = peer->ibp_ni->ni_data;
+ struct sockaddr_in srcaddr;
+ struct sockaddr_in dstaddr;
int rc;
+ LASSERT (net != NULL);
LASSERT (peer->ibp_connecting > 0);
cmid = rdma_create_id(kiblnd_cm_callback, peer, RDMA_PS_TCP);
goto failed;
}
- memset(&sockaddr, 0, sizeof(sockaddr));
- sockaddr.sin_family = AF_INET;
- sockaddr.sin_port = htons(*kiblnd_tunables.kib_service);
- sockaddr.sin_addr.s_addr = htonl(LNET_NIDADDR(peer->ibp_nid));
+ memset(&srcaddr, 0, sizeof(srcaddr));
+ srcaddr.sin_family = AF_INET;
+ srcaddr.sin_addr.s_addr = htonl(net->ibn_dev->ibd_ifip);
+
+ memset(&dstaddr, 0, sizeof(dstaddr));
+ dstaddr.sin_family = AF_INET;
+ dstaddr.sin_port = htons(*kiblnd_tunables.kib_service);
+ dstaddr.sin_addr.s_addr = htonl(LNET_NIDADDR(peer->ibp_nid));
kiblnd_peer_addref(peer); /* cmid's ref */
- rc = rdma_resolve_addr(cmid, NULL, (struct sockaddr *)&sockaddr,
+ rc = rdma_resolve_addr(cmid,
+ (struct sockaddr *)&srcaddr,
+ (struct sockaddr *)&dstaddr,
*kiblnd_tunables.kib_timeout * 1000);
if (rc == 0)
return;