Skip to content

Commit

Permalink
providers/efa: Add QP service level in EFA DV
Browse files Browse the repository at this point in the history
Add SL parameter to EFA create QP direct verb and pass it to the kernel.
Update documentation accordingly.

Reviewed-by: Firas Jahjah <firasj@amazon.com>
Reviewed-by: Yonatan Nachum <ynachum@amazon.com>
Signed-off-by: Michael Margolin <mrgolin@amazon.com>
  • Loading branch information
mrgolin committed Oct 29, 2024
1 parent fcb3547 commit cd38554
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion providers/efa/efadv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion providers/efa/man/efadv_create_qp_ex.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};
```

Expand All @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions providers/efa/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,6 +1500,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));
Expand Down

0 comments on commit cd38554

Please sign in to comment.