From: haodong tang Date: Wed, 4 Apr 2018 03:19:38 +0000 (+0800) Subject: msg/async/rdma: add RDMA iWARP protocol support X-Git-Tag: v14.0.1~1001^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a240aef14391342951e46b19a99340829fc576b1;p=ceph.git msg/async/rdma: add RDMA iWARP protocol support Signed-off-by: Haodong Tang --- diff --git a/ceph.spec.in b/ceph.spec.in index 25ba2391d5f8..e76feeac0dc5 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -199,6 +199,7 @@ BuildRequires: btrfs-progs BuildRequires: nss-devel BuildRequires: keyutils-libs-devel BuildRequires: libibverbs-devel +BuildRequires: librdmacm-devel BuildRequires: openldap-devel BuildRequires: openssl-devel BuildRequires: CUnit-devel diff --git a/cmake/modules/Findrdma.cmake b/cmake/modules/Findrdma.cmake index eb31f7922c91..dcc6cac825b3 100644 --- a/cmake/modules/Findrdma.cmake +++ b/cmake/modules/Findrdma.cmake @@ -10,9 +10,12 @@ find_path(RDMA_INCLUDE_DIR infiniband/verbs.h) set(RDMA_NAMES ${RDMA_NAMES} ibverbs) find_library(RDMA_LIBRARY NAMES ${RDMA_NAMES}) +set(RDMACM_NAMES ${RDMACM_NAMES} rdmacm) +find_library(RDMACM_LIBRARY NAMES ${RDMACM_NAMES}) + if (RDMA_INCLUDE_DIR AND RDMA_LIBRARY) set(RDMA_FOUND TRUE) - set(RDMA_LIBRARIES ${RDMA_LIBRARY}) + set(RDMA_LIBRARIES ${RDMA_LIBRARY} ${RDMACM_LIBRARY}) else () set(RDMA_FOUND FALSE) set( RDMA_LIBRARIES ) @@ -20,6 +23,7 @@ endif () if (RDMA_FOUND) message(STATUS "Found libibverbs: ${RDMA_LIBRARY}") + message(STATUS "Found librdmacm: ${RDMACM_LIBRARY}") include(CheckCXXSourceCompiles) CHECK_CXX_SOURCE_COMPILES(" diff --git a/debian/control b/debian/control index d9906ef10fc2..220897a6d191 100644 --- a/debian/control +++ b/debian/control @@ -35,6 +35,7 @@ Build-Depends: bc, libfuse-dev, libgoogle-perftools-dev [i386 amd64 arm64], libibverbs-dev, + librdmacm-dev, libkeyutils-dev, libldap2-dev, libleveldb-dev, diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b372759b7752..afceda5c0394 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -408,7 +408,9 @@ if(HAVE_RDMA) list(APPEND async_rdma_common_srcs msg/async/rdma/Infiniband.cc msg/async/rdma/RDMAConnectedSocketImpl.cc + msg/async/rdma/RDMAIWARPConnectedSocketImpl.cc msg/async/rdma/RDMAServerSocketImpl.cc + msg/async/rdma/RDMAIWARPServerSocketImpl.cc msg/async/rdma/RDMAStack.cc) endif(HAVE_RDMA) @@ -663,7 +665,7 @@ if(HAVE_UDEV) list(APPEND ceph_common_deps ${UDEV_LIBRARIES}) endif() if(HAVE_RDMA) - list(APPEND ceph_common_deps ${RDMA_LIBRARY}) + list(APPEND ceph_common_deps ${RDMA_LIBRARIES}) endif() if(NOT WITH_SYSTEM_BOOST) list(APPEND ceph_common_deps ${ZLIB_LIBRARIES}) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 5d2bacb12ed8..02638506b692 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -168,6 +168,10 @@ OPTION(ms_async_rdma_roce_ver, OPT_INT) // 0=RoCEv1, 1=RoCEv2, 2=RoCEv1. OPTION(ms_async_rdma_sl, OPT_INT) // in RoCE, this means PCP OPTION(ms_async_rdma_dscp, OPT_INT) // in RoCE, this means DSCP +// rdma connection management +OPTION(ms_async_rdma_cm, OPT_BOOL) +OPTION(ms_async_rdma_type, OPT_STR) + OPTION(ms_dpdk_port_id, OPT_INT) SAFE_OPTION(ms_dpdk_coremask, OPT_STR) // it is modified in unittest so that use SAFE_OPTION to declare OPTION(ms_dpdk_memory_channel, OPT_STR) diff --git a/src/common/options.cc b/src/common/options.cc index 2a31285ff228..b8ed5e79be62 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1048,6 +1048,14 @@ std::vector