]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/async/rdma: check device_attr->max_srq is not zero
authorChangcheng Liu <changcheng.liu@aliyun.com>
Mon, 3 Jun 2019 09:53:37 +0000 (17:53 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Fri, 23 Aug 2019 02:45:05 +0000 (10:45 +0800)
Some rdma devices don't support srq(shared receive queue).
Check hardware attribute if ceph is configured to use srq.

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

index 4f7b344367a351fe7c6d4b834c4b0be179d90371..80c00685919e34c1f9b4ceda4772f048abc08302 100644 (file)
@@ -915,8 +915,10 @@ void Infiniband::init()
   ceph_assert(NetHandler(cct).set_nonblock(device->ctxt->async_fd) == 0);
 
   support_srq = cct->_conf->ms_async_rdma_support_srq;
-  if (support_srq)
+  if (support_srq) {
+    ceph_assert(device->device_attr.max_srq);
     rx_queue_len = device->device_attr.max_srq_wr;
+  }
   else
     rx_queue_len = device->device_attr.max_qp_wr;
   if (rx_queue_len > cct->_conf->ms_async_rdma_receive_queue_len) {