mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
RDMA/mana_ib: Extend modify QP
Extend modify QP to support further attributes: local_ack_timeout, UD qkey, rate_limit, qp_access_flags, flow_label, max_rd_atomic. Signed-off-by: Shiraz Saleem <shirazsaleem@microsoft.com> Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com> Link: https://patch.msgid.link/1757923172-4475-1-git-send-email-kotaranov@linux.microsoft.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
2bbe1255fc
commit
2bd7dd3836
|
|
@ -412,7 +412,7 @@ struct mana_ib_ah_attr {
|
|||
u8 traffic_class;
|
||||
u16 src_port;
|
||||
u16 dest_port;
|
||||
u32 reserved;
|
||||
u32 flow_label;
|
||||
};
|
||||
|
||||
struct mana_rnic_set_qp_state_req {
|
||||
|
|
@ -429,8 +429,15 @@ struct mana_rnic_set_qp_state_req {
|
|||
u32 retry_cnt;
|
||||
u32 rnr_retry;
|
||||
u32 min_rnr_timer;
|
||||
u32 reserved;
|
||||
u32 rate_limit;
|
||||
struct mana_ib_ah_attr ah_attr;
|
||||
u64 reserved1;
|
||||
u32 qkey;
|
||||
u32 qp_access_flags;
|
||||
u8 local_ack_timeout;
|
||||
u8 max_rd_atomic;
|
||||
u16 reserved2;
|
||||
u32 reserved3;
|
||||
}; /* HW Data */
|
||||
|
||||
struct mana_rnic_set_qp_state_resp {
|
||||
|
|
|
|||
|
|
@ -735,6 +735,8 @@ static int mana_ib_gd_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
|
|||
int err;
|
||||
|
||||
mana_gd_init_req_hdr(&req.hdr, MANA_IB_SET_QP_STATE, sizeof(req), sizeof(resp));
|
||||
|
||||
req.hdr.req.msg_version = GDMA_MESSAGE_V3;
|
||||
req.hdr.dev_id = mdev->gdma_dev->dev_id;
|
||||
req.adapter = mdev->adapter_handle;
|
||||
req.qp_handle = qp->qp_handle;
|
||||
|
|
@ -748,6 +750,12 @@ static int mana_ib_gd_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
|
|||
req.retry_cnt = attr->retry_cnt;
|
||||
req.rnr_retry = attr->rnr_retry;
|
||||
req.min_rnr_timer = attr->min_rnr_timer;
|
||||
req.rate_limit = attr->rate_limit;
|
||||
req.qkey = attr->qkey;
|
||||
req.local_ack_timeout = attr->timeout;
|
||||
req.qp_access_flags = attr->qp_access_flags;
|
||||
req.max_rd_atomic = attr->max_rd_atomic;
|
||||
|
||||
if (attr_mask & IB_QP_AV) {
|
||||
ndev = mana_ib_get_netdev(&mdev->ib_dev, ibqp->port);
|
||||
if (!ndev) {
|
||||
|
|
@ -774,6 +782,7 @@ static int mana_ib_gd_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
|
|||
ibqp->qp_num, attr->dest_qp_num);
|
||||
req.ah_attr.traffic_class = attr->ah_attr.grh.traffic_class >> 2;
|
||||
req.ah_attr.hop_limit = attr->ah_attr.grh.hop_limit;
|
||||
req.ah_attr.flow_label = attr->ah_attr.grh.flow_label;
|
||||
}
|
||||
|
||||
err = mana_gd_send_request(gc, sizeof(req), &req, sizeof(resp), &resp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user