Commit 662f13ec authored by Wenpeng Liang's avatar Wenpeng Liang Committed by ZhouJuan
Browse files

RDMA/hns: Remove redundant member doorbell_qpn of struct hns_roce_qp

mainline inclusion
from mainline-v6.1-rc1
commit bfb3bde9
category: cleanup
bugzilla: https://gitee.com/openeuler/kernel/issues/I7UVH7
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bfb3bde95479e7072839564ec90dbf5d00bfb9b1

----------------------------------------------------------------------

The value of doorbell_qpn is always equal to qpn on current hardware
versions. So remove it.

Link: https://lore.kernel.org/r/20220829105021.1427804-5-liangwenpeng@huawei.com


Signed-off-by: default avatarWenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarJuan Zhou <zhoujuan51@h-partners.com>
parent 476d6aa3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -656,7 +656,6 @@ struct hns_roce_qp {
	struct hns_roce_db	sdb;
	unsigned long		en_flags;
	unsigned long		congest_type;
	u32			doorbell_qpn;
	enum ib_sig_type	sq_signal_bits;
	struct hns_roce_wq	sq;

+1 −1
Original line number Diff line number Diff line
@@ -725,7 +725,7 @@ static inline void update_sq_db(struct hns_roce_dev *hr_dev,
	} else {
		struct hns_roce_v2_db sq_db = {};

		hr_reg_write(&sq_db, DB_TAG, qp->doorbell_qpn);
		hr_reg_write(&sq_db, DB_TAG, qp->qpn);
		hr_reg_write(&sq_db, DB_CMD, HNS_ROCE_V2_SQ_DB);
		hr_reg_write(&sq_db, DB_PI, qp->sq.head);
		hr_reg_write(&sq_db, DB_SL, qp->sl);
+0 −3
Original line number Diff line number Diff line
@@ -236,7 +236,6 @@ static int alloc_qpn(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,

	if (hr_qp->ibqp.qp_type == IB_QPT_GSI) {
		num = 1;
		hr_qp->doorbell_qpn = 1;
	} else {
		mutex_lock(&qp_table->bank_mutex);
		bankid = get_least_load_bankid_for_qp(init_attr, qp_table->bank);
@@ -252,8 +251,6 @@ static int alloc_qpn(struct hns_roce_dev *hr_dev, struct hns_roce_qp *hr_qp,

		qp_table->bank[bankid].inuse++;
		mutex_unlock(&qp_table->bank_mutex);

		hr_qp->doorbell_qpn = (u32)num;
	}

	hr_qp->qpn = num;