def create_srq(self, cmid): srq_init_attr = SrqInitAttr(SrqAttr(max_wr=self.num_msgs)) try: self.srq = SRQ(cmid.pd, srq_init_attr) except PyverbsRDMAError as ex: if ex.error_code == errno.EOPNOTSUPP: raise unittest.SkipTest('Create SRQ is not supported') raise ex
def _create_rdma_objects(self): cq = CQ(self.pd_res.ctx, 100, None, None, 0) dev_attr = self.pd_res.ctx.query_device() qp_cap = u.random_qp_cap(dev_attr) qia = QPInitAttr(scq=cq, rcq=cq, cap=qp_cap) qia.qp_type = e.IBV_QPT_RC QP(self.pd_res.parent_domain, qia) srq_init_attr = SrqInitAttr(SrqAttr()) SRQ(self.pd_res.parent_domain, srq_init_attr)
def _create_rdma_objects(self): cq = CQ(self.pd_res.ctx, 100, None, None, 0) dev_attr = self.pd_res.ctx.query_device() qp_cap = u.random_qp_cap(dev_attr) qia = QPInitAttr(scq=cq, rcq=cq, cap=qp_cap) qia.qp_type = e.IBV_QPT_RC QP(self.pd_res.parent_domain, qia) srq_init_attr = SrqInitAttr(SrqAttr()) SRQ(self.pd_res.parent_domain, srq_init_attr) cq_init_attrs_ex = CqInitAttrEx( comp_mask=e.IBV_CQ_INIT_ATTR_MASK_PD, parent_domain=self.pd_res.parent_domain) CQEX(self.pd_res.ctx, cq_init_attrs_ex)
def create_srq_attr(self): return SrqAttr(max_wr=self.num_msgs*self.qp_count)