From: Amir Vadai Date: Tue, 23 May 2017 07:33:33 +0000 (+0300) Subject: Revert "msg/async/rdma: get_device() by ibv_context" X-Git-Tag: ses5-milestone6~9^2~21^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be76afe88887b57063bc6fd632eb97d4d9497244;p=ceph.git Revert "msg/async/rdma: get_device() by ibv_context" This reverts commit f47025f83711d9af4a52470327fbd7411aafdafe. Change-Id: Icc3667da1828868bc5001d1d8e8b2ec14e5f6c8e Issue: 995322 Signed-off-by: Amir Vadai --- diff --git a/src/msg/async/rdma/Device.cc b/src/msg/async/rdma/Device.cc index 6f7df5b11333..ee5bbd73fd88 100644 --- a/src/msg/async/rdma/Device.cc +++ b/src/msg/async/rdma/Device.cc @@ -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; diff --git a/src/msg/async/rdma/Device.h b/src/msg/async/rdma/Device.h index 148a7517437e..5ba7d5ca4efe 100644 --- a/src/msg/async/rdma/Device.h +++ b/src/msg/async/rdma/Device.h @@ -153,7 +153,6 @@ class DeviceList { ~DeviceList(); Device* get_device(const char* device_name); - Device* get_device(const struct ibv_context *ctxt); void uninit(); diff --git a/src/msg/async/rdma/Infiniband.cc b/src/msg/async/rdma/Infiniband.cc index cda9d2bd206d..de9d6e21b9a0 100644 --- a/src/msg/async/rdma/Infiniband.cc +++ b/src/msg/async/rdma/Infiniband.cc @@ -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) { diff --git a/src/msg/async/rdma/Infiniband.h b/src/msg/async/rdma/Infiniband.h index 58cf13e1938a..9b94fa0f21a8 100644 --- a/src/msg/async/rdma/Infiniband.h +++ b/src/msg/async/rdma/Infiniband.h @@ -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);