RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
authorSirong Wang <wangsirong@huawei.com>
Fri, 1 Nov 2019 02:33:29 +0000 (10:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:01 +0000 (08:51 +0100)
commit65e5e9913161e3c0d61528b6a1745e568635d94e
tree960ad69219e7d94ce6d8a369e4b0b77b14a9b643
parentd4bc855afd2e1b93bbc94f67e98b8ce867d89f09
RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN

[ Upstream commit 531eb45b3da4267fc2a64233ba256c8ffb02edd2 ]

Size of pointer to buf field of struct hns_roce_hem_chunk should be
considered when calculating HNS_ROCE_HEM_CHUNK_LEN, or sg table size will
be larger than expected when allocating hem.

Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/1572575610-52530-2-git-send-email-liweihang@hisilicon.com
Signed-off-by: Sirong Wang <wangsirong@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/hns/hns_roce_hem.h