Skip to content

Commit c9b7fa8

Browse files
committed
RDMA/efa: Add option to set QP service level on create
JIRA: https://issues.redhat.com/browse/RHEL-83223 commit 48931f6 Author: Michael Margolin <mrgolin@amazon.com> Date: Tue Oct 15 17:42:42 2024 +0000 RDMA/efa: Add option to set QP service level on create Using modify QP with AH attributes and IB_QP_AV flag set doesn't make much sense for connectionless QP types like SRD. Add SL parameter to EFA create QP user ABI and pass it to the device. Link: https://patch.msgid.link/r/20241015174242.3490-3-mrgolin@amazon.com Reviewed-by: Firas Jahjah <firasj@amazon.com> Reviewed-by: Yonatan Nachum <ynachum@amazon.com> Signed-off-by: Michael Margolin <mrgolin@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Kamal Heib <kheib@redhat.com>
1 parent 567a551 commit c9b7fa8

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

drivers/infiniband/hw/efa/efa_com_cmd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ int efa_com_create_qp(struct efa_com_dev *edev,
3131
create_qp_cmd.qp_alloc_size.recv_queue_depth =
3232
params->rq_depth;
3333
create_qp_cmd.uar = params->uarn;
34+
create_qp_cmd.sl = params->sl;
3435

3536
if (params->unsolicited_write_recv)
3637
EFA_SET(&create_qp_cmd.flags, EFA_ADMIN_CREATE_QP_CMD_UNSOLICITED_WRITE_RECV, 1);

drivers/infiniband/hw/efa/efa_com_cmd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ struct efa_com_create_qp_params {
2727
u16 pd;
2828
u16 uarn;
2929
u8 qp_type;
30+
u8 sl;
3031
u8 unsolicited_write_recv : 1;
3132
};
3233

drivers/infiniband/hw/efa/efa_verbs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ int efa_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *init_attr,
676676
goto err_out;
677677
}
678678

679-
if (cmd.comp_mask || !is_reserved_cleared(cmd.reserved_90)) {
679+
if (cmd.comp_mask || !is_reserved_cleared(cmd.reserved_98)) {
680680
ibdev_dbg(&dev->ibdev,
681681
"Incompatible ABI params, unknown fields in udata\n");
682682
err = -EINVAL;
@@ -732,6 +732,8 @@ int efa_create_qp(struct ib_qp *ibqp, struct ib_qp_init_attr *init_attr,
732732
create_qp_params.rq_base_addr = qp->rq_dma_addr;
733733
}
734734

735+
create_qp_params.sl = cmd.sl;
736+
735737
if (cmd.flags & EFA_CREATE_QP_WITH_UNSOLICITED_WRITE_RECV)
736738
create_qp_params.unsolicited_write_recv = true;
737739

include/uapi/rdma/efa-abi.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ struct efa_ibv_create_qp {
9595
__u32 sq_ring_size; /* bytes */
9696
__u32 driver_qp_type;
9797
__u16 flags;
98-
__u8 reserved_90[6];
98+
__u8 sl;
99+
__u8 reserved_98[5];
99100
};
100101

101102
struct efa_ibv_create_qp_resp {

0 commit comments

Comments
 (0)