Commit fe164fc8 authored by Wenpeng Liang's avatar Wenpeng Liang Committed by Jason Gunthorpe

RDMA/hns: Remove dqpn filling when modify qp from Init to Init

According to the IB specification, the destination qpn is allowed to be
filled into the qpc only when the qp transitions from Init to RTR, so this
code is unused.

Link: https://lore.kernel.org/r/1629985056-57004-4-git-send-email-liangwenpeng@huawei.comSigned-off-by: default avatarWenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent d2e0ccff
...@@ -4143,8 +4143,6 @@ static void modify_qp_init_to_init(struct ib_qp *ibqp, ...@@ -4143,8 +4143,6 @@ static void modify_qp_init_to_init(struct ib_qp *ibqp,
struct hns_roce_v2_qp_context *context, struct hns_roce_v2_qp_context *context,
struct hns_roce_v2_qp_context *qpc_mask) struct hns_roce_v2_qp_context *qpc_mask)
{ {
struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
/* /*
* In v2 engine, software pass context and context mask to hardware * In v2 engine, software pass context and context mask to hardware
* when modifying qp. If software need modify some fields in context, * when modifying qp. If software need modify some fields in context,
...@@ -4169,11 +4167,6 @@ static void modify_qp_init_to_init(struct ib_qp *ibqp, ...@@ -4169,11 +4167,6 @@ static void modify_qp_init_to_init(struct ib_qp *ibqp,
hr_reg_write(context, QPC_SRQN, to_hr_srq(ibqp->srq)->srqn); hr_reg_write(context, QPC_SRQN, to_hr_srq(ibqp->srq)->srqn);
hr_reg_clear(qpc_mask, QPC_SRQN); hr_reg_clear(qpc_mask, QPC_SRQN);
} }
if (attr_mask & IB_QP_DEST_QPN) {
hr_reg_write(context, QPC_DQPN, hr_qp->qpn);
hr_reg_clear(qpc_mask, QPC_DQPN);
}
} }
static int config_qp_rq_buf(struct hns_roce_dev *hr_dev, static int config_qp_rq_buf(struct hns_roce_dev *hr_dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment