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
示例#2
0
 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)
示例#3
0
 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)
示例#4
0
 def create_srq_init_attr(self):
     return SrqInitAttr(self.create_srq_attr())