]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async/rdma: remove stack from RDMADispatcher
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 7 Aug 2019 06:27:05 +0000 (14:27 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 23 Aug 2019 06:36:05 +0000 (14:36 +0800)
There's no need to cache stack since RDMADispatcher already has
Inifiniband obj ib.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/msg/async/rdma/RDMAStack.cc
src/msg/async/rdma/RDMAStack.h

index fa60a59f45eec8c0b37cc426128acc20bace6ed6..3a6bda44a4528c34eddc8f9f257a72fa6381f149 100644 (file)
@@ -43,9 +43,8 @@ RDMADispatcher::~RDMADispatcher()
   delete async_handler;
 }
 
-RDMADispatcher::RDMADispatcher(CephContext* c, RDMAStack* s, shared_ptr<Infiniband>& ib)
-  : cct(c), ib(ib), async_handler(new C_handle_cq_async(this)),
-  stack(s)
+RDMADispatcher::RDMADispatcher(CephContext* c, shared_ptr<Infiniband>& ib)
+  : cct(c), ib(ib), async_handler(new C_handle_cq_async(this))
 {
   PerfCountersBuilder plb(cct, "AsyncMessenger::RDMADispatcher", l_msgr_rdma_dispatcher_first, l_msgr_rdma_dispatcher_last);
 
@@ -656,7 +655,7 @@ void RDMAWorker::handle_pending_message()
 }
 
 RDMAStack::RDMAStack(CephContext *cct, const string &t)
-  : NetworkStack(cct, t), ib(make_shared<Infiniband>(cct)), dispatcher(cct, this, ib)
+  : NetworkStack(cct, t), ib(make_shared<Infiniband>(cct)), dispatcher(cct, ib)
 {
   ldout(cct, 20) << __func__ << " constructing RDMAStack..." << dendl;
 
index cf180f892f52e4717dfc6b5dc0694cd72243a476..a92b925efe0f9305b1ce6075772645d998e6ff10 100644 (file)
@@ -78,7 +78,6 @@ class RDMADispatcher {
     ceph::make_mutex("RDMADispatcher::for worker pending list");
   // fixme: lockfree
   std::list<RDMAWorker*> pending_workers;
-  RDMAStack* stack;
 
   class C_handle_cq_async : public EventCallback {
     RDMADispatcher *dispatcher;
@@ -93,7 +92,7 @@ class RDMADispatcher {
  public:
   PerfCounters *perf_logger;
 
-  explicit RDMADispatcher(CephContext* c, RDMAStack* s, shared_ptr<Infiniband>& ib);
+  explicit RDMADispatcher(CephContext* c, shared_ptr<Infiniband>& ib);
   virtual ~RDMADispatcher();
   void handle_async_event();
 
@@ -109,7 +108,6 @@ class RDMADispatcher {
     pending_workers.push_back(w);
     ++num_pending_workers;
   }
-  RDMAStack* get_stack() { return stack; }
   RDMAConnectedSocketImpl* get_conn_lockless(uint32_t qp);
   QueuePair* get_qp(uint32_t qp);
   void erase_qpn_lockless(uint32_t qpn);