diff options
author | Yixian Liu <liuyixian@huawei.com> | 2019-11-18 10:34:51 +0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-25 10:31:48 -0400 |
commit | 18a96d25ce84a365fbe9ddcb887ade80eb3a6017 (patch) | |
tree | 77f05bd285e2c4e5d49bdbd2927cd1f856ba798e /drivers/infiniband/hw/hns/hns_roce_device.h | |
parent | RDMA/hns: Redefine interfaces used in creating cq (diff) | |
download | linux-dev-18a96d25ce84a365fbe9ddcb887ade80eb3a6017.tar.xz linux-dev-18a96d25ce84a365fbe9ddcb887ade80eb3a6017.zip |
RDMA/hns: Redefine the member of hns_roce_cq struct
There is no need to package buf and mtt into hns_roce_cq_buf, which will
make code more complex, just delete this struct and move buf and mtt into
hns_roce_cq. Furthermore, we add size member for hns_roce_buf to avoid
repeatly calculating where needed it.
Link: https://lore.kernel.org/r/1574044493-46984-3-git-send-email-liweihang@hisilicon.com
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.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.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h index 8f628a772644..608ec5936d71 100644 --- a/drivers/infiniband/hw/hns/hns_roce_device.h +++ b/drivers/infiniband/hw/hns/hns_roce_device.h @@ -448,6 +448,7 @@ struct hns_roce_buf { struct hns_roce_buf_list *page_list; int nbufs; u32 npages; + u32 size; int page_shift; }; @@ -479,14 +480,10 @@ struct hns_roce_db { int order; }; -struct hns_roce_cq_buf { - struct hns_roce_buf hr_buf; - struct hns_roce_mtt hr_mtt; -}; - struct hns_roce_cq { struct ib_cq ib_cq; - struct hns_roce_cq_buf hr_buf; + struct hns_roce_buf buf; + struct hns_roce_mtt mtt; struct hns_roce_db db; u8 db_en; spinlock_t lock; |