]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "msg/async/rdma: get_device() by ibv_context"
authorAmir Vadai <amir@vadai.me>
Tue, 23 May 2017 07:33:33 +0000 (10:33 +0300)
committerAmir Vadai <amir@vadai.me>
Tue, 23 May 2017 14:04:05 +0000 (17:04 +0300)
This reverts commit f47025f83711d9af4a52470327fbd7411aafdafe.

Change-Id: Icc3667da1828868bc5001d1d8e8b2ec14e5f6c8e
Issue: 995322
Signed-off-by: Amir Vadai <amir@vadai.me>
src/msg/async/rdma/Device.cc
src/msg/async/rdma/Device.h
src/msg/async/rdma/Infiniband.cc
src/msg/async/rdma/Infiniband.h

index 6f7df5b1133300bc43cf2f7870573a31d754104a..ee5bbd73fd884cf9c3c1d4aada97f94dbf8466da 100644 (file)
@@ -456,21 +456,6 @@ Device* DeviceList::get_device(const char* device_name)
   return NULL;
 }
 
-
-Device* DeviceList::get_device(const struct ibv_context *ctxt)
-{
-  ibv_device *device = ctxt->device;
-
-  assert(devices);
-  for (int i = 0; i < num; ++i) {
-    if (devices[i]->ctxt->device == device) {
-      return devices[i];
-    }
-  }
-
-  return NULL;
-}
-
 int DeviceList::poll_tx(int num_entries, Device **d, ibv_wc *wc)
 {
   int n = 0;
index 148a7517437e4ba24905bfcd0edb5641eb7adcaf..5ba7d5ca4efe4d66d0a46d62c12cedca8ae46f5b 100644 (file)
@@ -153,7 +153,6 @@ class DeviceList {
   ~DeviceList();
 
   Device* get_device(const char* device_name);
-  Device* get_device(const struct ibv_context *ctxt);
 
   void uninit();
 
index cda9d2bd206d120b1c40737f1c1be5e543127c3d..de9d6e21b9a0421e9a221e2a9d71e3925061c275 100644 (file)
@@ -609,11 +609,6 @@ Device* Infiniband::get_device(const char* device_name)
   return device_list->get_device(device_name);
 }
 
-Device *Infiniband::get_device(const struct ibv_context *ctxt)
-{
-  return device_list->get_device(ctxt);
-}
-
 Infiniband::QueuePair::~QueuePair()
 {
   if (qp) {
index 58cf13e1938a5b228f8dbd68f349b3f2ff0a2d1c..9b94fa0f21a811e55f6c438816fa213db51cd478 100644 (file)
@@ -277,7 +277,6 @@ class Infiniband {
   void handle_pre_fork();
 
   Device* get_device(const char* device_name);
-  Device* get_device(const struct ibv_context *ctxt);
 
   int poll_tx(int n, Device **d, ibv_wc *wc);
   int poll_rx(int n, Device **d, ibv_wc *wc);