Пример #1
0
 def create_srq(self):
     srq_attr = SrqInitAttrEx()
     srq_attr.comp_mask = e.IBV_SRQ_INIT_ATTR_TYPE | e.IBV_SRQ_INIT_ATTR_PD | \
                          e.IBV_SRQ_INIT_ATTR_CQ | e.IBV_SRQ_INIT_ATTR_TM
     srq_attr.srq_type = e.IBV_SRQT_TM
     srq_attr.pd = self.pd
     srq_attr.cq = self.cq
     srq_attr.max_num_tags = self.ctx.query_device_ex().tm_caps.max_num_tags
     srq_attr.max_ops = 10
     self.srq = SRQ(self.ctx, srq_attr)
Пример #2
0
 def create_srq(self):
     """
     Initializes self.srq with a Shared Receive QP object.
     :return: None
     """
     srq_attr = SrqInitAttrEx(max_wr=self.qp_count*self.num_msgs)
     srq_attr.srq_type = e.IBV_SRQT_XRC
     srq_attr.pd = self.pd
     srq_attr.xrcd = self.xrcd
     srq_attr.cq = self.cq
     srq_attr.comp_mask = e.IBV_SRQ_INIT_ATTR_TYPE | e.IBV_SRQ_INIT_ATTR_PD | \
                          e.IBV_SRQ_INIT_ATTR_CQ | e.IBV_SRQ_INIT_ATTR_XRCD
     self.srq = SRQ(self.ctx, srq_attr)