msg/async/rdma: get local/peer qpn from RDMAConnectedSocketImpl

When remote QP is destroyed, QP will be disconnected. The local QP
is transitioned into error state. Then some asynchronous event or
completion event could be triggered. Need to get the qpn through
RDMAConnectedSocketImpl object.
Add get_local/peer_qpn to get qpn from RDMAConnectedSocketImpl class.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
This commit is contained in:
Changcheng Liu 2019-08-27 17:17:28 +08:00
parent 0736b46bf7
commit 3f620383bf

View File

@ -219,6 +219,8 @@ class RDMAConnectedSocketImpl : public ConnectedSocketImpl {
virtual int fd() const override { return notify_fd; }
void fault();
const char* get_qp_state() { return Infiniband::qp_state_string(qp->get_state()); }
uint32_t get_peer_qpn () const { return peer_qpn; }
uint32_t get_local_qpn () const { return local_qpn; }
ssize_t submit(bool more);
int activate();
void fin();