]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Fix wrong assignment of lp_pktn_ini in QPC
authorWeihang Li <liweihang@huawei.com>
Tue, 14 Jul 2020 11:28:58 +0000 (19:28 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 16 Jul 2020 12:52:14 +0000 (09:52 -0300)
commit7cca815df23d7e2b7e628056b98273bceb75714f
tree899b61d55594a85c1332983937c468abfc5659ef
parent4e7a7104bf65005a434daa596100e66f780677cb
RDMA/hns: Fix wrong assignment of lp_pktn_ini in QPC

The RoCE Engine will schedule to another QP after one has sent
(2 ^ lp_pktn_ini) packets. lp_pktn_ini is set in QPC and should be
calculated from 2 factors:

1. current MTU as a integer
2. the RoCE Engine's maximum slice length 64KB

But the driver use MTU as a enum ib_mtu and the max inline capability, the
lp_pktn_ini will be much bigger than expected which may cause traffic of
some QPs to never get scheduled.

Fixes: cd62678b5730 ("RDMA/hns: Adjust lp_pktn_ini dynamically")
Link: https://lore.kernel.org/r/1594726138-49294-1-git-send-email-liweihang@huawei.com
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c