]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: Add support for addressing when hopnum is 0
authorXi Wang <wangxi11@huawei.com>
Mon, 13 Apr 2020 11:58:06 +0000 (19:58 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 22 Apr 2020 18:59:53 +0000 (15:59 -0300)
commit7d3ad4617fc9cf3cd419ee3f1448b2cde3fc0f40
tree0d275c1b29104b6c0d4d9b2a0276e1fe5f82d32d
parentec09d222b70b3055351f8ba41b75728bced06b69
RDMA/hns: Add support for addressing when hopnum is 0

Currently, WQE and EQE table have already used the mtr interface to config
and access memory by multi-hop addressing when hopnum is from 1 to 3. But
if hopnum is 0, each table need write its own but repetitive logic, and
many duplicate code exists in the mtr interfaces invoke process.

So wraps the public logic as 3 functions: hns_roce_mtr_create(),
hns_roce_mtr_destroy() and hns_roce_mtr_map() to support hopnum ranges from
0 to 3. In addition, makes the mtr interfaces easier to use.

Link: https://lore.kernel.org/r/1586779091-51410-2-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_device.h
drivers/infiniband/hw/hns/hns_roce_hem.c
drivers/infiniband/hw/hns/hns_roce_hem.h
drivers/infiniband/hw/hns/hns_roce_mr.c