RDMA/hns: Create QP with selected QPN for bank load balance
authorYangyang Li <liyangyang20@huawei.com>
Tue, 24 Nov 2020 12:24:09 +0000 (20:24 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 27 Nov 2020 16:44:26 +0000 (12:44 -0400)
commit71586dd2001087e89e344e2c7dcee6b4a53bb6de
tree2aa85075e7d4df205637fd8039c1bd38d7f74a1c
parent66f57b871efc576dfe8117b65af4e805e03ea689
RDMA/hns: Create QP with selected QPN for bank load balance

In order to improve performance by balancing the load between different
banks of cache, the QPC cache is desigend to choose one of 8 banks
according to lower 3 bits of QPN. The hns driver needs to count the number
of QP on each bank and then assigns the QP being created to the bank with
the minimum load first.

Link: https://lore.kernel.org/r/1606220649-1465-1-git-send-email-liweihang@huawei.com
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_qp.c