]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/rdma: Introduce Device.{cc,h} 14001/head
authorAmir Vadai <amir@vadai.me>
Wed, 15 Mar 2017 09:08:38 +0000 (11:08 +0200)
committerAdir Lev <adirl@mellanox.com>
Thu, 16 Mar 2017 14:00:13 +0000 (16:00 +0200)
Later on, multidevice support will be added and Device class will be the
main RDMA class (instead of Infiniband as it is today).

Issue: 995322
Change-Id: I060d849de21c8f847dd11ecd3edf1ddfb79b0820
Signed-off-by: Amir Vadai <amir@vadai.me>
src/CMakeLists.txt
src/msg/async/rdma/Device.cc [new file with mode: 0644]
src/msg/async/rdma/Device.h [new file with mode: 0644]
src/msg/async/rdma/Infiniband.cc
src/msg/async/rdma/Infiniband.h
src/msg/async/rdma/RDMAConnectedSocketImpl.cc
src/msg/async/rdma/RDMAStack.cc
src/msg/async/rdma/RDMAStack.h

index b0fb2d6888ecc096c237a0de7d4342e0655860a5..179598a332463216d448d81437c17af028f71b47 100644 (file)
@@ -347,6 +347,7 @@ set(async_rdma_common_srcs)
 if(HAVE_RDMA)
   list(APPEND async_rdma_common_srcs
     msg/async/rdma/Infiniband.cc
+    msg/async/rdma/Device.cc
     msg/async/rdma/RDMAConnectedSocketImpl.cc
     msg/async/rdma/RDMAServerSocketImpl.cc
     msg/async/rdma/RDMAStack.cc)
diff --git a/src/msg/async/rdma/Device.cc b/src/msg/async/rdma/Device.cc
new file mode 100644 (file)
index 0000000..41b2d89
--- /dev/null
@@ -0,0 +1,184 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 XSKY <haomai@xsky.com>
+ *
+ * Author: Haomai Wang <haomaiwang@gmail.com>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation.  See file COPYING.
+ *
+ */
+
+#include "Infiniband.h"
+#include "Device.h"
+#include "common/errno.h"
+#include "common/debug.h"
+
+#define dout_subsys ceph_subsys_ms
+#undef dout_prefix
+#define dout_prefix *_dout << "IBDevice "
+
+Port::Port(CephContext *cct, struct ibv_context* ictxt, uint8_t ipn): ctxt(ictxt), port_num(ipn), port_attr(new ibv_port_attr)
+{
+#ifdef HAVE_IBV_EXP
+  union ibv_gid cgid;
+  struct ibv_exp_gid_attr gid_attr;
+  bool malformed = false;
+
+  ldout(cct,1) << __func__ << " using experimental verbs for gid" << dendl;
+  int r = ibv_query_port(ctxt, port_num, port_attr);
+  if (r == -1) {
+    lderr(cct) << __func__  << " query port failed  " << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+
+  lid = port_attr->lid;
+
+  // search for requested GID in GIDs table
+  ldout(cct, 1) << __func__ << " looking for local GID " << (cct->_conf->ms_async_rdma_local_gid)
+    << " of type " << (cct->_conf->ms_async_rdma_roce_ver) << dendl;
+  r = sscanf(cct->_conf->ms_async_rdma_local_gid.c_str(),
+            "%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx"
+            ":%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx",
+            &cgid.raw[ 0], &cgid.raw[ 1],
+            &cgid.raw[ 2], &cgid.raw[ 3],
+            &cgid.raw[ 4], &cgid.raw[ 5],
+            &cgid.raw[ 6], &cgid.raw[ 7],
+            &cgid.raw[ 8], &cgid.raw[ 9],
+            &cgid.raw[10], &cgid.raw[11],
+            &cgid.raw[12], &cgid.raw[13],
+            &cgid.raw[14], &cgid.raw[15]);
+
+  if (r != 16) {
+    ldout(cct, 1) << __func__ << " malformed or no GID supplied, using GID index 0" << dendl;
+    malformed = true;
+  }
+
+  gid_attr.comp_mask = IBV_EXP_QUERY_GID_ATTR_TYPE;
+
+  for (gid_idx = 0; gid_idx < port_attr->gid_tbl_len; gid_idx++) {
+    r = ibv_query_gid(ctxt, port_num, gid_idx, &gid);
+    if (r) {
+      lderr(cct) << __func__  << " query gid of port " << port_num << " index " << gid_idx << " failed  " << cpp_strerror(errno) << dendl;
+      ceph_abort();
+    }
+    r = ibv_exp_query_gid_attr(ctxt, port_num, gid_idx, &gid_attr);
+    if (r) {
+      lderr(cct) << __func__  << " query gid attributes of port " << port_num << " index " << gid_idx << " failed  " << cpp_strerror(errno) << dendl;
+      ceph_abort();
+    }
+
+    if (malformed) break; // stay with gid_idx=0
+    if ( (gid_attr.type == cct->_conf->ms_async_rdma_roce_ver) &&
+        (memcmp(&gid, &cgid, 16) == 0) ) {
+      ldout(cct, 1) << __func__ << " found at index " << gid_idx << dendl;
+      break;
+    }
+  }
+
+  if (gid_idx == port_attr->gid_tbl_len) {
+    lderr(cct) << __func__ << " Requested local GID was not found in GID table" << dendl;
+    ceph_abort();
+  }
+#else
+  int r = ibv_query_port(ctxt, port_num, port_attr);
+  if (r == -1) {
+    lderr(cct) << __func__  << " query port failed  " << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+
+  lid = port_attr->lid;
+  r = ibv_query_gid(ctxt, port_num, 0, &gid);
+  if (r) {
+    lderr(cct) << __func__  << " query gid failed  " << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+#endif
+}
+
+
+Device::Device(CephContext *cct, ibv_device* d): device(d), device_attr(new ibv_device_attr), active_port(nullptr)
+{
+  if (device == NULL) {
+    lderr(cct) << __func__ << " device == NULL" << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+  name = ibv_get_device_name(device);
+  ctxt = ibv_open_device(device);
+  if (ctxt == NULL) {
+    lderr(cct) << __func__ << " open rdma device failed. " << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+  int r = ibv_query_device(ctxt, device_attr);
+  if (r == -1) {
+    lderr(cct) << __func__ << " failed to query rdma device. " << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+}
+
+Device::~Device()
+{
+  if (active_port) {
+    delete active_port;
+    assert(ibv_close_device(ctxt) == 0);
+  }
+}
+
+void Device::binding_port(CephContext *cct, int port_num) {
+  port_cnt = device_attr->phys_port_cnt;
+  for (uint8_t i = 0; i < port_cnt; ++i) {
+    Port *port = new Port(cct, ctxt, i+1);
+    if (i + 1 == port_num && port->get_port_attr()->state == IBV_PORT_ACTIVE) {
+      active_port = port;
+      ldout(cct, 1) << __func__ << " found active port " << i+1 << dendl;
+      break;
+    } else {
+      ldout(cct, 10) << __func__ << " port " << i+1 << " is not what we want. state: " << port->get_port_attr()->state << ")"<< dendl;
+    }
+    delete port;
+  }
+  if (nullptr == active_port) {
+    lderr(cct) << __func__ << "  port not found" << dendl;
+    assert(active_port);
+  }
+}
+
+
+DeviceList::DeviceList(CephContext *cct)
+  : device_list(ibv_get_device_list(&num))
+{
+  if (device_list == NULL || num == 0) {
+    lderr(cct) << __func__ << " failed to get rdma device list.  " << cpp_strerror(errno) << dendl;
+    ceph_abort();
+  }
+  devices = new Device*[num];
+
+  for (int i = 0;i < num; ++i) {
+    devices[i] = new Device(cct, device_list[i]);
+  }
+}
+
+DeviceList::~DeviceList()
+{
+  for (int i=0; i < num; ++i) {
+    delete devices[i];
+  }
+  delete []devices;
+  ibv_free_device_list(device_list);
+}
+
+Device* DeviceList::get_device(const char* device_name)
+{
+  assert(devices);
+  for (int i = 0; i < num; ++i) {
+    if (!strlen(device_name) || !strcmp(device_name, devices[i]->get_name())) {
+      return devices[i];
+    }
+  }
+  return NULL;
+}
diff --git a/src/msg/async/rdma/Device.h b/src/msg/async/rdma/Device.h
new file mode 100644 (file)
index 0000000..9bd51a4
--- /dev/null
@@ -0,0 +1,81 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- 
+// vim: ts=8 sw=2 smarttab
+/*
+ * Ceph - scalable distributed file system
+ *
+ * Copyright (C) 2016 XSKY <haomai@xsky.com>
+ *
+ * Author: Haomai Wang <haomaiwang@gmail.com>
+ *
+ * This is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software
+ * Foundation.  See file COPYING.
+ *
+ */
+
+#ifndef CEPH_RDMA_DEVICE_H
+#define CEPH_RDMA_DEVICE_H
+
+#include <infiniband/verbs.h>
+
+#include <string>
+#include <vector>
+
+#include "include/int_types.h"
+#include "include/page.h"
+#include "common/debug.h"
+#include "common/errno.h"
+#include "msg/msg_types.h"
+#include "msg/async/net_handler.h"
+#include "common/Mutex.h"
+
+class Port {
+  struct ibv_context* ctxt;
+  int port_num;
+  struct ibv_port_attr* port_attr;
+  uint16_t lid;
+  int gid_idx;
+  union ibv_gid gid;
+
+ public:
+  explicit Port(CephContext *cct, struct ibv_context* ictxt, uint8_t ipn);
+  uint16_t get_lid() { return lid; }
+  ibv_gid  get_gid() { return gid; }
+  int get_port_num() { return port_num; }
+  ibv_port_attr* get_port_attr() { return port_attr; }
+  int get_gid_idx() { return gid_idx; }
+};
+
+
+class Device {
+  ibv_device *device;
+  const char* name;
+  uint8_t  port_cnt;
+ public:
+  explicit Device(CephContext *c, ibv_device* d);
+  ~Device();
+
+  const char* get_name() { return name;}
+  uint16_t get_lid() { return active_port->get_lid(); }
+  ibv_gid get_gid() { return active_port->get_gid(); }
+  int get_gid_idx() { return active_port->get_gid_idx(); }
+  void binding_port(CephContext *c, int port_num);
+  struct ibv_context *ctxt;
+  ibv_device_attr *device_attr;
+  Port* active_port;
+};
+
+
+class DeviceList {
+  struct ibv_device ** device_list;
+  int num;
+  Device** devices;
+ public:
+  DeviceList(CephContext *cct);
+  ~DeviceList();
+
+  Device* get_device(const char* device_name);
+};
+
+#endif
index 25811e2000156031a8796e7d7496a89307154839..74429af4938d3ce02d487c46d03ce059c93c2747 100644 (file)
@@ -15,6 +15,8 @@
  */
 
 #include "Infiniband.h"
+#include "Device.h"
+
 #include "common/errno.h"
 #include "common/debug.h"
 
@@ -27,124 +29,6 @@ static const uint32_t MAX_INLINE_DATA = 0;
 static const uint32_t TCP_MSG_LEN = sizeof("0000:00000000:00000000:00000000:00000000000000000000000000000000");
 static const uint32_t CQ_DEPTH = 30000;
 
-Port::Port(CephContext *cct, struct ibv_context* ictxt, uint8_t ipn): ctxt(ictxt), port_num(ipn), port_attr(new ibv_port_attr)
-{
-#ifdef HAVE_IBV_EXP
-  union ibv_gid cgid;
-  struct ibv_exp_gid_attr gid_attr;
-  bool malformed = false;
-
-  ldout(cct,1) << __func__ << " using experimental verbs for gid" << dendl;
-  int r = ibv_query_port(ctxt, port_num, port_attr);
-  if (r == -1) {
-    lderr(cct) << __func__  << " query port failed  " << cpp_strerror(errno) << dendl;
-    ceph_abort();
-  }
-
-  lid = port_attr->lid;
-
-  // search for requested GID in GIDs table
-  ldout(cct, 1) << __func__ << " looking for local GID " << (cct->_conf->ms_async_rdma_local_gid)
-    << " of type " << (cct->_conf->ms_async_rdma_roce_ver) << dendl;
-  r = sscanf(cct->_conf->ms_async_rdma_local_gid.c_str(),
-            "%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx"
-            ":%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx:%02hhx%02hhx",
-            &cgid.raw[ 0], &cgid.raw[ 1],
-            &cgid.raw[ 2], &cgid.raw[ 3],
-            &cgid.raw[ 4], &cgid.raw[ 5],
-            &cgid.raw[ 6], &cgid.raw[ 7],
-            &cgid.raw[ 8], &cgid.raw[ 9],
-            &cgid.raw[10], &cgid.raw[11],
-            &cgid.raw[12], &cgid.raw[13],
-            &cgid.raw[14], &cgid.raw[15]);
-
-  if (r != 16) {
-    ldout(cct, 1) << __func__ << " malformed or no GID supplied, using GID index 0" << dendl;
-    malformed = true;
-  }
-
-  gid_attr.comp_mask = IBV_EXP_QUERY_GID_ATTR_TYPE;
-
-  for (gid_idx = 0; gid_idx < port_attr->gid_tbl_len; gid_idx++) {
-    r = ibv_query_gid(ctxt, port_num, gid_idx, &gid);
-    if (r) {
-      lderr(cct) << __func__  << " query gid of port " << port_num << " index " << gid_idx << " failed  " << cpp_strerror(errno) << dendl;
-      ceph_abort();
-    }
-    r = ibv_exp_query_gid_attr(ctxt, port_num, gid_idx, &gid_attr);
-    if (r) {
-      lderr(cct) << __func__  << " query gid attributes of port " << port_num << " index " << gid_idx << " failed  " << cpp_strerror(errno) << dendl;
-      ceph_abort();
-    }
-
-    if (malformed) break; // stay with gid_idx=0
-    if ( (gid_attr.type == cct->_conf->ms_async_rdma_roce_ver) &&
-        (memcmp(&gid, &cgid, 16) == 0) ) {
-      ldout(cct, 1) << __func__ << " found at index " << gid_idx << dendl;
-      break;
-    }
-  }
-
-  if (gid_idx == port_attr->gid_tbl_len) {
-    lderr(cct) << __func__ << " Requested local GID was not found in GID table" << dendl;
-    ceph_abort();
-  }
-#else
-  int r = ibv_query_port(ctxt, port_num, port_attr);
-  if (r == -1) {
-    lderr(cct) << __func__  << " query port failed  " << cpp_strerror(errno) << dendl;
-    ceph_abort();
-  }
-
-  lid = port_attr->lid;
-  r = ibv_query_gid(ctxt, port_num, 0, &gid);
-  if (r) {
-    lderr(cct) << __func__  << " query gid failed  " << cpp_strerror(errno) << dendl;
-    ceph_abort();
-  }
-#endif
-}
-
-
-Device::Device(CephContext *cct, ibv_device* d): device(d), device_attr(new ibv_device_attr), active_port(nullptr)
-{
-  if (device == NULL) {
-    lderr(cct) << __func__ << " device == NULL" << cpp_strerror(errno) << dendl;
-    ceph_abort();
-  }
-  name = ibv_get_device_name(device);
-  ctxt = ibv_open_device(device);
-  if (ctxt == NULL) {
-    lderr(cct) << __func__ << " open rdma device failed. " << cpp_strerror(errno) << dendl;
-    ceph_abort();
-  }
-  int r = ibv_query_device(ctxt, device_attr);
-  if (r == -1) {
-    lderr(cct) << __func__ << " failed to query rdma device. " << cpp_strerror(errno) << dendl;
-    ceph_abort();
-  }
-}
-
-void Device::binding_port(CephContext *cct, int port_num) {
-  port_cnt = device_attr->phys_port_cnt;
-  for (uint8_t i = 0; i < port_cnt; ++i) {
-    Port *port = new Port(cct, ctxt, i+1);
-    if (i + 1 == port_num && port->get_port_attr()->state == IBV_PORT_ACTIVE) {
-      active_port = port;
-      ldout(cct, 1) << __func__ << " found active port " << i+1 << dendl;
-      break;
-    } else {
-      ldout(cct, 10) << __func__ << " port " << i+1 << " is not what we want. state: " << port->get_port_attr()->state << ")"<< dendl;
-    }
-    delete port;
-  }
-  if (nullptr == active_port) {
-    lderr(cct) << __func__ << "  port not found" << dendl;
-    assert(active_port);
-  }
-}
-
-
 Infiniband::QueuePair::QueuePair(
     CephContext *c, Infiniband& infiniband, ibv_qp_type type,
     int port, ibv_srq *srq,
@@ -711,9 +595,10 @@ int Infiniband::MemoryManager::get_channel_buffers(std::vector<Chunk*> &chunks,
 }
 
 
-Infiniband::Infiniband(CephContext *cct, const std::string &device_name, uint8_t port_num): device_list(cct)
+Infiniband::Infiniband(CephContext *cct, const std::string &device_name, uint8_t port_num)
+  : device_list(new DeviceList(cct))
 {
-  device = device_list.get_device(device_name.c_str());
+  device = device_list->get_device(device_name.c_str());
   device->binding_port(cct, port_num);
   assert(device);
   ib_physical_port = device->active_port->get_port_num();
@@ -753,6 +638,7 @@ Infiniband::~Infiniband()
   assert(ibv_destroy_srq(srq) == 0);
   delete memory_manager;
   delete pd;
+  delete device_list;
 }
 
 /**
index bfab33f9491a54df886458c89b7f46301c27b7f9..25b711ac2e6dc15f1c500d2899c551529d8632ed 100644 (file)
@@ -44,83 +44,9 @@ struct IBSYNMsg {
 
 class RDMAStack;
 class CephContext;
-
-class Port {
-  struct ibv_context* ctxt;
-  int port_num;
-  struct ibv_port_attr* port_attr;
-  uint16_t lid;
-  int gid_idx;
-  union ibv_gid gid;
-
- public:
-  explicit Port(CephContext *cct, struct ibv_context* ictxt, uint8_t ipn);
-  uint16_t get_lid() { return lid; }
-  ibv_gid  get_gid() { return gid; }
-  int get_port_num() { return port_num; }
-  ibv_port_attr* get_port_attr() { return port_attr; }
-  int get_gid_idx() { return gid_idx; }
-};
-
-
-class Device {
-  ibv_device *device;
-  const char* name;
-  uint8_t  port_cnt;
- public:
-  explicit Device(CephContext *c, ibv_device* d);
-  ~Device() {
-    if (active_port) {
-      delete active_port;
-      assert(ibv_close_device(ctxt) == 0);
-    }
-  }
-  const char* get_name() { return name;}
-  uint16_t get_lid() { return active_port->get_lid(); }
-  ibv_gid get_gid() { return active_port->get_gid(); }
-  int get_gid_idx() { return active_port->get_gid_idx(); }
-  void binding_port(CephContext *c, int port_num);
-  struct ibv_context *ctxt;
-  ibv_device_attr *device_attr;
-  Port* active_port;
-};
-
-
-class DeviceList {
-  struct ibv_device ** device_list;
-  int num;
-  Device** devices;
- public:
-  DeviceList(CephContext *cct): device_list(ibv_get_device_list(&num)) {
-    if (device_list == NULL || num == 0) {
-      lderr(cct) << __func__ << " failed to get rdma device list.  " << cpp_strerror(errno) << dendl;
-      ceph_abort();
-    }
-    devices = new Device*[num];
-
-    for (int i = 0;i < num; ++i) {
-      devices[i] = new Device(cct, device_list[i]);
-    }
-  }
-  ~DeviceList() {
-    for (int i=0; i < num; ++i) {
-      delete devices[i];
-    }
-    delete []devices;
-    ibv_free_device_list(device_list);
-  }
-
-  Device* get_device(const char* device_name) {
-    assert(devices);
-    for (int i = 0; i < num; ++i) {
-      if (!strlen(device_name) || !strcmp(device_name, devices[i]->get_name())) {
-        return devices[i];
-      }
-    }
-    return NULL;
-  }
-};
-
+class Port;
+class Device;
+class DeviceList;
 
 class Infiniband {
  public:
@@ -223,7 +149,7 @@ class Infiniband {
   ibv_srq* srq;             // shared receive work queue
   Device *device;
   ProtectionDomain *pd;
-  DeviceList device_list;
+  DeviceList *device_list;
   void wire_gid_to_gid(const char *wgid, union ibv_gid *gid);
   void gid_to_wire_gid(const union ibv_gid *gid, char wgid[]);
 
@@ -358,11 +284,8 @@ class Infiniband {
   uint8_t get_ib_physical_port() { return ib_physical_port; }
   int send_msg(CephContext *cct, int sd, IBSYNMsg& msg);
   int recv_msg(CephContext *cct, int sd, IBSYNMsg& msg);
-  uint16_t get_lid() { return device->get_lid(); }
-  ibv_gid get_gid() { return device->get_gid(); }
   MemoryManager* get_memory_manager() { return memory_manager; }
   Device* get_device() { return device; }
-  int get_async_fd() { return device->ctxt->async_fd; }
   bool is_tx_buffer(const char* c) { return memory_manager->is_tx_buffer(c);}
   bool is_rx_buffer(const char* c) { return memory_manager->is_rx_buffer(c);}
   Chunk *get_tx_chunk_by_buffer(const char *c) { return memory_manager->get_tx_chunk_by_buffer(c); }
index 1634e606965dc492f9b4596188b8454152138cd2..8269e44f00dc3f4cde33241820dd3d2bf684248a 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include "RDMAStack.h"
+#include "Device.h"
 
 #define dout_subsys ceph_subsys_ms
 #undef dout_prefix
@@ -27,13 +28,16 @@ RDMAConnectedSocketImpl::RDMAConnectedSocketImpl(CephContext *cct, Infiniband* i
     is_server(false), con_handler(new C_handle_connection(this)),
     active(false)
 {
+  ibdev = ib->get_device();
+  ibport = ib->get_ib_physical_port();
+
   qp = infiniband->create_queue_pair(
                                     cct, s->get_tx_cq(), s->get_rx_cq(), IBV_QPT_RC);
   my_msg.qpn = qp->get_local_qp_number();
   my_msg.psn = qp->get_initial_psn();
-  my_msg.lid = infiniband->get_lid();
+  my_msg.lid = ibdev->get_lid();
   my_msg.peer_qpn = 0;
-  my_msg.gid = infiniband->get_gid();
+  my_msg.gid = ibdev->get_gid();
   notify_fd = dispatcher->register_qp(qp, this);
   dispatcher->perf_logger->inc(l_msgr_rdma_created_queue_pair);
   dispatcher->perf_logger->inc(l_msgr_rdma_active_queue_pair);
@@ -581,7 +585,10 @@ void RDMAConnectedSocketImpl::cleanup() {
 void RDMAConnectedSocketImpl::notify()
 {
   uint64_t i = 1;
-  write(notify_fd, &i, sizeof(i));
+  int ret;
+
+  ret = write(notify_fd, &i, sizeof(i));
+  assert(ret = sizeof(i));
 }
 
 void RDMAConnectedSocketImpl::shutdown()
index e3e3c2037c43a28fd7a2d982b6458f7d9ee22a1c..e946afad0142d56d2ca4a3a2defdc044927a1bf3 100644 (file)
@@ -22,6 +22,7 @@
 #include "common/deleter.h"
 #include "common/Tub.h"
 #include "RDMAStack.h"
+#include "Device.h"
 
 #define dout_subsys ceph_subsys_ms
 #undef dout_prefix
index 0e855a3e73bdb110c8fa51783af16a8f2f160234..9e5d288bd3bd5f7f4cf733926d5e221676d3d9b4 100644 (file)
@@ -209,6 +209,8 @@ class RDMAConnectedSocketImpl : public ConnectedSocketImpl {
  private:
   CephContext *cct;
   Infiniband::QueuePair *qp;
+  Device *ibdev;
+  int ibport;
   IBSYNMsg peer_msg;
   IBSYNMsg my_msg;
   int connected;