From: Changcheng Liu Date: Mon, 3 Jun 2019 09:53:37 +0000 (+0800) Subject: msg/async/rdma: check device_attr->max_srq is not zero X-Git-Tag: v15.1.0~1781^2~35 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9c7ba67cc7acd4b183c79a680f5a15aaab9f3530;p=ceph-ci.git msg/async/rdma: check device_attr->max_srq is not zero 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 --- diff --git a/src/msg/async/rdma/Infiniband.cc b/src/msg/async/rdma/Infiniband.cc index 4f7b344367a..80c00685919 100644 --- a/src/msg/async/rdma/Infiniband.cc +++ b/src/msg/async/rdma/Infiniband.cc @@ -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) {