diff --git a/providers/efa/efadv.h b/providers/efa/efadv.h index 5e1f50396..16c769571 100644 --- a/providers/efa/efadv.h +++ b/providers/efa/efadv.h @@ -33,7 +33,8 @@ struct efadv_qp_init_attr { uint64_t comp_mask; uint32_t driver_qp_type; uint16_t flags; - uint8_t reserved[2]; + uint8_t sl; + uint8_t reserved[1]; }; struct ibv_qp *efadv_create_qp_ex(struct ibv_context *ibvctx, diff --git a/providers/efa/man/efadv_create_qp_ex.3.md b/providers/efa/man/efadv_create_qp_ex.3.md index d4066dc61..aaeedfdee 100644 --- a/providers/efa/man/efadv_create_qp_ex.3.md +++ b/providers/efa/man/efadv_create_qp_ex.3.md @@ -45,7 +45,8 @@ struct efadv_qp_init_attr { uint64_t comp_mask; uint32_t driver_qp_type; uint16_t flags; - uint8_t reserved[2]; + uint8_t sl; + uint8_t reserved[1]; }; ``` @@ -67,6 +68,9 @@ struct efadv_qp_init_attr { EFADV_QP_FLAGS_UNSOLICITED_WRITE_RECV: Receive WRs will not be consumed for RDMA write with imm. +*sl* +: Service Level - 0 value implies default level. + # RETURN VALUE efadv_create_qp_ex() returns a pointer to the created QP, or NULL if the request fails. diff --git a/providers/efa/verbs.c b/providers/efa/verbs.c index 0488f6b01..106f72444 100644 --- a/providers/efa/verbs.c +++ b/providers/efa/verbs.c @@ -1501,6 +1501,8 @@ static struct ibv_qp *create_qp(struct ibv_context *ibvctx, if (efa_attr->flags & EFADV_QP_FLAGS_UNSOLICITED_WRITE_RECV) req.flags |= EFA_CREATE_QP_WITH_UNSOLICITED_WRITE_RECV; + req.sl = efa_attr->sl; + err = ibv_cmd_create_qp_ex(ibvctx, &qp->verbs_qp, attr, &req.ibv_cmd, sizeof(req), &resp.ibv_resp, sizeof(resp)); diff --git a/pyverbs/providers/efa/efadv.pyx b/pyverbs/providers/efa/efadv.pyx index c7d8b1ad3..afccad31f 100644 --- a/pyverbs/providers/efa/efadv.pyx +++ b/pyverbs/providers/efa/efadv.pyx @@ -182,6 +182,14 @@ cdef class EfaQPInitAttr(PyverbsObject): def flags(self, val): self.qp_init_attr.flags = val + @property + def sl(self): + return self.qp_init_attr.sl + + @sl.setter + def sl(self,val): + self.qp_init_attr.sl = val + cdef class SRDQPEx(QPEx): """ diff --git a/pyverbs/providers/efa/libefa.pxd b/pyverbs/providers/efa/libefa.pxd index 43879b574..265868ac0 100644 --- a/pyverbs/providers/efa/libefa.pxd +++ b/pyverbs/providers/efa/libefa.pxd @@ -30,7 +30,8 @@ cdef extern from 'infiniband/efadv.h': uint64_t comp_mask; uint32_t driver_qp_type; uint16_t flags; - uint8_t reserved[2]; + uint8_t sl; + uint8_t reserved[1]; cdef struct efadv_cq_init_attr: uint64_t comp_mask;