OSDN Git Service

RDMA/hns: Limit the size of extend sge of sq
authorLijun Ou <oulijun@huawei.com>
Sun, 30 Sep 2018 09:00:31 +0000 (17:00 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 3 Oct 2018 22:21:17 +0000 (16:21 -0600)
commit05ad5482a5904c416bcfd74afd7193e206e563ce
tree9aa7c6e03d6c5d6fac4a89e1621ff13cb48f6b06
parent15fc056fba7b17b9abfbe80a12f188403fc949fb
RDMA/hns: Limit the size of extend sge of sq

The hip08 split two hardware version. The version id are 0x20 and 0x21
according to the PCI revison. The max size of extend sge of sq is limited
to 2M for 0x20 version and 8M for 0x21 version. It may be exceeded to 2M
according to the algorithm that compute the product of wqe count and
extend sge number of every wqe. But the product always less than 8M.

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_hw_v2.h
drivers/infiniband/hw/hns/hns_roce_qp.c