]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Correct the value of srq_desc_size
authorWenpeng Liang <liangwenpeng@huawei.com>
Fri, 1 Nov 2019 02:33:30 +0000 (10:33 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 6 Nov 2019 17:37:02 +0000 (13:37 -0400)
commit37eb3711064d97246e0fe41eb6e53e5e6f6b0ace
tree32ca9bbf98c42d0f15996251d1a2768ba244ab5a
parent99aa077732c41ef893a873fe5ccb495dfab02f80
RDMA/hns: Correct the value of srq_desc_size

srq_desc_size should be rounded up to pow of two before used, or related
calculation may cause allocating wrong size of memory for srq buffer.

Fixes: fbe6e729ac72 ("RDMA/hns: Add SRQ support for hip08 kernel mode")
Link: https://lore.kernel.org/r/1572575610-52530-3-git-send-email-liweihang@hisilicon.com
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_srq.c