Commit eac0fb16 authored by wangsirong's avatar wangsirong Committed by Xie XiuQi
Browse files

RDMA/hns: Set tempid for each netdevice



driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

The template is a function of DCQCN, and the driver
needs to increase the support of the template.

Feature or Bugfix: Feature

Signed-off-by: default avatarwangsirong <wangsirong@huawei.com>
Signed-off-by: default avatarliyangyang (M) <liyangyang20@huawei.com>
Reviewed-by: default avataroulijun <oulijun@huawei.com>
Reviewed-by: default avatarliuyixian <liuyixian@huawei.com>
Reviewed-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 4bf21e75
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3513,6 +3513,8 @@ static void modify_qp_reset_to_init(struct ib_qp *ibqp,
	struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
	struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
	struct hns_roce_cq *send_cq, *recv_cq;
	struct net_device *net_dev = hr_dev->iboe.netdevs[hr_qp->port];
	u32 temp_id = 0;

	hns_roce_get_cqs(ibqp, &send_cq, &recv_cq);
	/*
@@ -3600,6 +3602,9 @@ static void modify_qp_reset_to_init(struct ib_qp *ibqp,
	roce_set_bit(qpc_mask->byte_56_dqpn_err, V2_QPC_BYTE_56_RQ_TX_ERR_S, 0);
	roce_set_bit(qpc_mask->byte_56_dqpn_err, V2_QPC_BYTE_56_RQ_RX_ERR_S, 0);

	sscanf(net_dev->name, "eth%u", &temp_id);
	roce_set_field(context->byte_60_qpst_tempid, V2_QPC_BYTE_60_TEMPID_M,
		       V2_QPC_BYTE_60_TEMPID_S, temp_id);
	roce_set_field(qpc_mask->byte_60_qpst_tempid, V2_QPC_BYTE_60_TEMPID_M,
		       V2_QPC_BYTE_60_TEMPID_S, 0);