RDMA/hns: Fix CQ and QP cache affinity
authorChengchang Tang <tangchengchang@huawei.com>
Fri, 4 Aug 2023 01:27:11 +0000 (09:27 +0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 7 Aug 2023 13:46:58 +0000 (16:46 +0300)
commit9e03dbea2b0634b21a45946b4f8097e0dc86ebe1
treeaad4b9cd17bcbf917607d2564b3bc975a43a52b6
parentc9c0bd3c177d93d80968f720304087ba83fe8f74
RDMA/hns: Fix CQ and QP cache affinity

Currently, the affinity between QP cache and CQ cache is not
considered when assigning QPN, it will affect the message rate of HW.

Allocate QPN from QP cache with better CQ affinity to get better
performance.

Fixes: 71586dd20010 ("RDMA/hns: Create QP with selected QPN for bank load balance")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Link: https://lore.kernel.org/r/20230804012711.808069-5-huangjunxian6@hisilicon.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_qp.c