summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hns/hns_roce_device.h
diff options
context:
space:
mode:
authorLang Cheng <chenglang@huawei.com>2020-05-05 13:30:07 +0300
committerJason Gunthorpe <jgg@mellanox.com>2020-05-13 02:37:06 +0300
commit90ae0b57e4a515342fe74ffa21f6972f5145d645 (patch)
treee107dc1f6ba2b93a44fda8fe617f8f6b57a8405a /drivers/infiniband/hw/hns/hns_roce_device.h
parent30661322b8c32e020c6638dc4317034ec95a1b3f (diff)
downloadlinux-90ae0b57e4a515342fe74ffa21f6972f5145d645.tar.xz
RDMA/hns: Combine enable flags of qp
It's easier to understand and maintain enable flags of qp using a single field in type of unsigned long than defining a field for every flags in the structure hns_roce_qp, and we can add new flags for features more conveniently in the future. Link: https://lore.kernel.org/r/1588674607-25337-4-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng <chenglang@huawei.com> Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns/hns_roce_device.h')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_device.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h
index 226df2040fdd..4fcd608ee55f 100644
--- a/drivers/infiniband/hw/hns/hns_roce_device.h
+++ b/drivers/infiniband/hw/hns/hns_roce_device.h
@@ -131,8 +131,8 @@ enum {
};
enum {
- HNS_ROCE_SUPPORT_RQ_RECORD_DB = 1 << 0,
- HNS_ROCE_SUPPORT_SQ_RECORD_DB = 1 << 1,
+ HNS_ROCE_QP_CAP_RQ_RECORD_DB = BIT(0),
+ HNS_ROCE_QP_CAP_SQ_RECORD_DB = BIT(1),
};
enum {
@@ -623,8 +623,7 @@ struct hns_roce_qp {
struct hns_roce_wq rq;
struct hns_roce_db rdb;
struct hns_roce_db sdb;
- u8 rdb_en;
- u8 sdb_en;
+ unsigned long en_flags;
u32 doorbell_qpn;
u32 sq_signal_bits;
struct hns_roce_wq sq;