msg/async/rdma: remove stack from RDMADispatcher

There's no need to cache stack since RDMADispatcher already has
Inifiniband obj ib.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
This commit is contained in:
Changcheng Liu 2019-08-07 14:27:05 +08:00 committed by Kefu Chai
parent 297452c2c6
commit 923b30f57e
2 changed files with 4 additions and 7 deletions

View 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;

View 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);