]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
msg/async/rdma: use wr_id address to check valid chunk 36908/head
authorChunsong Feng <fengchunsong@huawei.com>
Mon, 17 Aug 2020 12:26:29 +0000 (20:26 +0800)
committerluo rixin <luorixin@huawei.com>
Tue, 1 Sep 2020 07:03:56 +0000 (15:03 +0800)
commitdd0d97a86651cbe3b959659574b606d8bdefbaff
treeb2e6a578aa2e7e0451677477a1b9208390302dfc
parentfa621c9d223aee4468e8921bc3f92a6544d754cc
msg/async/rdma: use wr_id address to check valid chunk

CQE's wr_id could be:
  1)BEACON_WRID
  2)&RDMAConnectedSocketImpl::qp
  3)Chunks address start from Cluster::chunk_base
When assuming qp as Chunk through CQE's wr_id, it's possible to misjudge
&(qp->ib_physical_port) into Cluster::[base, end) because there're 4 bytes
random data filled in the higher 4 bytes address around ib_pysical_port due
to the address alignement requirement of structure member.
Fix this case by checking whether wr_id value is in the allocated Chunk space.

Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: luo rixin <luorixin@huawei.com>
src/msg/async/rdma/Infiniband.h
src/msg/async/rdma/RDMAStack.cc