OSDN Git Service

RDMA/hns: Modify the value of long message loopback slice
authorYangyang Li <liyangyang20@huawei.com>
Fri, 12 May 2023 09:22:45 +0000 (17:22 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 17 May 2023 19:05:00 +0000 (16:05 -0300)
commit56518a603fd2bf74762d176ac980572db84a3e14
treee52031ccadf2b7e4c05bcefa9329447904002049
parent7f3969b14f356dd65fa95b3528eb05c32e68bc06
RDMA/hns: Modify the value of long message loopback slice

Long message loopback slice is used for achieving traffic balance between
QPs. It prevents the problem that QPs with large traffic occupying the
hardware pipeline for a long time and QPs with small traffic cannot be
scheduled.

Currently, its maximum value is set to 16K, which means only after a QP
sends 16K will the second QP be scheduled. This value is too large, which
will lead to unbalanced traffic scheduling, and thus it needs to be
modified.

The setting range of the long message loopback slice is modified to be
from 1024 (the lower limit supported by hardware) to mtu. Actual testing
shows that this value can significantly reduce error in hardware traffic
scheduling.

This solution is compatible with both HIP08 and HIP09. The modified
lp_pktn_ini has a maximum value of 2 (when mtu is 256), so the range
checking code for lp_pktn_ini is no longer necessary and needs to be
deleted.

Fixes: 0e60778efb07 ("RDMA/hns: Modify the value of MAX_LP_MSG_LEN to meet hardware compatibility")
Link: https://lore.kernel.org/r/20230512092245.344442-4-huangjunxian6@hisilicon.com
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c