mbox series

[v3,for-next,0/9] RDMA/hns: Clean up and refactor mailbox-related code

Message ID 20220302064830.61706-1-liangwenpeng@huawei.com (mailing list archive)
Headers show
Series RDMA/hns: Clean up and refactor mailbox-related code | expand

Message

Wenpeng Liang March 2, 2022, 6:48 a.m. UTC
Mailbox-related code is getting harder to maintain. Especially after
removing the HIP06 code, the mailbox-related code needs to be cleaned
up and refactored more urgently.

The following is the basic information of each patch:
(1) #1~#4: Preparing for refactoring
(2) #5: Formal Refactoring
(3) #6~#9: Follow-up cleanup

Changes since v2:
* Keep using ERR_CAST in the patch #7.
* v2 Link: https://patchwork.kernel.org/project/linux-rdma/cover/20220225112559.43300-1-liangwenpeng@huawei.com/

Changes since v1:
* Remove unnecessary mbox_msg assignment functions in patch #5.
* Add a new patch #7 to clean up the return value check of hns_roce_alloc_cmd_mailbox().
* v1 Link: https://patchwork.kernel.org/project/linux-rdma/cover/20220218110519.37375-1-liangwenpeng@huawei.com/

Chengchang Tang (5):
  RDMA/hns: Remove the unused parameter "op_modifier" in mailbox
  RDMA/hns: Remove fixed parameter “timeout” in the mailbox
  RDMA/hns: Refactor mailbox functions
  RDMA/hns: Remove similar code that configures the hardware contexts
  RDMA/hns: Refactor the alloc_srqc()

Wenpeng Liang (4):
  RDMA/hns: Remove redundant parameter "mailbox" in the mailbox
  RDMA/hns: Fix the wrong type of parameter "op" of the mailbox
  RDMA/hns: Clean up the return value check of
    hns_roce_alloc_cmd_mailbox()
  RDMA/hns: Refactor the alloc_cqc()

 drivers/infiniband/hw/hns/hns_roce_cmd.c      |  97 ++++++------
 drivers/infiniband/hw/hns/hns_roce_cmd.h      |   8 +-
 drivers/infiniband/hw/hns/hns_roce_cq.c       |  71 +++++----
 drivers/infiniband/hw/hns/hns_roce_device.h   |  24 +--
 drivers/infiniband/hw/hns/hns_roce_hem.c      |   4 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c    | 147 ++++++++----------
 .../infiniband/hw/hns/hns_roce_hw_v2_dfx.c    |   5 +-
 drivers/infiniband/hw/hns/hns_roce_mr.c       |  44 ++----
 drivers/infiniband/hw/hns/hns_roce_srq.c      | 106 +++++++------
 9 files changed, 252 insertions(+), 254 deletions(-)

--
2.33.0

Comments

Jason Gunthorpe March 5, 2022, 12:25 a.m. UTC | #1
On Wed, Mar 02, 2022 at 02:48:21PM +0800, Wenpeng Liang wrote:
> Mailbox-related code is getting harder to maintain. Especially after
> removing the HIP06 code, the mailbox-related code needs to be cleaned
> up and refactored more urgently.
> 
> The following is the basic information of each patch:
> (1) #1~#4: Preparing for refactoring
> (2) #5: Formal Refactoring
> (3) #6~#9: Follow-up cleanup
> 
> Changes since v2:
> * Keep using ERR_CAST in the patch #7.
> * v2 Link: https://patchwork.kernel.org/project/linux-rdma/cover/20220225112559.43300-1-liangwenpeng@huawei.com/
> 
> Changes since v1:
> * Remove unnecessary mbox_msg assignment functions in patch #5.
> * Add a new patch #7 to clean up the return value check of hns_roce_alloc_cmd_mailbox().
> * v1 Link: https://patchwork.kernel.org/project/linux-rdma/cover/20220218110519.37375-1-liangwenpeng@huawei.com/
> 
> Chengchang Tang (5):
>   RDMA/hns: Remove the unused parameter "op_modifier" in mailbox
>   RDMA/hns: Remove fixed parameter “timeout” in the mailbox
>   RDMA/hns: Refactor mailbox functions
>   RDMA/hns: Remove similar code that configures the hardware contexts
>   RDMA/hns: Refactor the alloc_srqc()
> 
> Wenpeng Liang (4):
>   RDMA/hns: Remove redundant parameter "mailbox" in the mailbox
>   RDMA/hns: Fix the wrong type of parameter "op" of the mailbox
>   RDMA/hns: Clean up the return value check of
>     hns_roce_alloc_cmd_mailbox()
>   RDMA/hns: Refactor the alloc_cqc()

Applied to for-next, thanks

Jason