]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Simplify the calculation and usage of wqe idx for post verbs
authorYixian Liu <liuyixian@huawei.com>
Tue, 10 Dec 2019 12:45:02 +0000 (20:45 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 3 Jan 2020 19:48:48 +0000 (15:48 -0400)
commit9a0ae6916e40e6fe67a9193cc7756158520e68a9
treea78b651869655a4a61cbb76fd56d21d3bed63579
parentdb5bb00eceef9bf37268174daf977b2288442719
RDMA/hns: Simplify the calculation and usage of wqe idx for post verbs

Currently, the wqe idx is calculated repeatly everywhere it is used.  This
patch defines wqe_idx and calculated it only once, then just use it as
needed.

Fixes: dc38acde737d ("RDMA/hns: Add support for processing send wr and receive wr")
Link: https://lore.kernel.org/r/1575981902-5274-1-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>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v1.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.c