This series first do necessary refactor on function's resource code to reduce the complexity of subsequent patches. Then the RoCE support for VFs is introduced. Changes since v1: - Simplify hr_reg_read() by FIELD_GET in #1. - Link: https://patchwork.kernel.org/project/linux-rdma/cover/1617353896-40727-1-git-send-email-liweihang@xxxxxxxxxx/ Wei Xu (4): RDMA/hns: Query the number of functions supported by the PF RDMA/hns: Reserve the resource for the VFs RDMA/hns: Set parameters of all the functions belong to a PF RDMA/hns: Enable RoCE on virtual functions Xi Wang (2): RDMA/hns: Simplify function's resource related command RDMA/hns: Remove duplicated hem page size config code drivers/infiniband/hw/hns/hns_roce_common.h | 10 + drivers/infiniband/hw/hns/hns_roce_device.h | 6 +- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 553 ++++++++++++++++------------ drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 236 +++--------- 4 files changed, 385 insertions(+), 420 deletions(-) -- 2.8.1