On Tue, Jul 14, 2020 at 07:28:58PM +0800, liweihang wrote: > From: Weihang Li <liweihang@xxxxxxxxxx> > > 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 never get scheduled. > > Fixes: b713128de7a1 ("RDMA/hns: Adjust lp_pktn_ini dynamically") > Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx> > --- > drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 34 +++++++++++++++++++----------- > 1 file changed, 22 insertions(+), 12 deletions(-) Applied to for-rc, thanks Jason