OSDN Git Service

RDMA/hns: Bugfix for posting multiple srq work request
authorLijun Ou <oulijun@huawei.com>
Thu, 30 May 2019 15:55:53 +0000 (23:55 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 31 May 2019 19:11:02 +0000 (16:11 -0300)
commit97545b10221ad14b046dba135a37f4e98a560697
tree15557f223569ae2ee89b7535509167ca0f14be55
parentcac2a301c02a9b178842e22df34217da7854e588
RDMA/hns: Bugfix for posting multiple srq work request

When the user submits more than 32 work request to a srq queue
at a time, it needs to find the corresponding number of entries
in the bitmap in the idx queue. However, the original lookup
function named ffs only processes 32 bits of the array element,
When the number of srq wqe issued exceeds 32, the ffs will only
process the lower 32 bits of the elements, it will not be able
to get the correct wqe index for srq wqe.

Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_srq.c