Skip to content

Refactor mlx5_ib_create_qp

Leon Romanovsky linux-rdma 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest36 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/36RDMA/mlx5: Organize QP types checks in one placedrivers/infiniband/hw/mlx5/qp.c+68 -610 replies
2/36RDMA/mlx5: Delete impossible GSI port checkdrivers/infiniband/hw/mlx5/gsi.c+0 -90 replies
3/36RDMA/mlx5: Perform check if QP creation flow is validdrivers/infiniband/hw/mlx5/qp.c+61 -670 replies
4/36RDMA/mlx5: Prepare QP allocation for future removaldrivers/infiniband/hw/mlx5/qp.c+20 -250 replies
5/36RDMA/mlx5: Avoid setting redundant NULL for XRC QPsdrivers/infiniband/hw/mlx5/qp.c+1 -70 replies
6/36RDMA/mlx5: Set QP subtype immediately when it is knowndrivers/infiniband/hw/mlx5/qp.c+2 -40 replies
7/36RDMA/mlx5: Separate create QP flows to be based on typedrivers/infiniband/hw/mlx5/qp.c+39 -150 replies
8/36RDMA/mlx5: Split scatter CQE configuration for DCT QPdrivers/infiniband/hw/mlx5/qp.c+6 -90 replies
9/36RDMA/mlx5: Update all DRIVER QP places to use QP subtypedrivers/infiniband/hw/mlx5/qp.c+15 -330 replies
10/36RDMA/mlx5: Move DRIVER QP flags check into separate functiondrivers/infiniband/hw/mlx5/qp.c+43 -480 replies
11/36RDMA/mlx5: Remove second copy from user for non RSS RAW QPsdrivers/infiniband/hw/mlx5/qp.c+27 -290 replies
12/36RDMA/mlx5: Initial separation of RAW_PACKET QP from common flowdrivers/infiniband/hw/mlx5/qp.c+17 -50 replies
13/36RDMA/mlx5: Delete create QP flags obfuscationdrivers/infiniband/hw/mlx5/devx.c drivers/infiniband/hw/mlx5/flow.c drivers/infiniband/hw/mlx5/main.c +2 more+47 -640 replies
14/36RDMA/mlx5: Process create QP flags in one placedrivers/infiniband/hw/mlx5/qp.c+101 -990 replies
15/36RDMA/mlx5: Use flags_en mechanism to mark QP created with WQE signaturedrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/odp.c drivers/infiniband/hw/mlx5/qp.c+23 -160 replies
16/36RDMA/mlx5: Change scatter CQE flag to be set like other vendor flagsdrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/qp.c+10 -80 replies
17/36RDMA/mlx5: Return all configured create flags through query QPdrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/qp.c+2 -120 replies
18/36RDMA/mlx5: Process all vendor flags in one placedrivers/infiniband/hw/mlx5/qp.c+71 -850 replies
19/36RDMA/mlx5: Delete unsupported QP typesdrivers/infiniband/hw/mlx5/qp.c+1 -110 replies
20/36RDMA/mlx5: Store QP type in the vendor QP structuredrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/odp.c drivers/infiniband/hw/mlx5/qp.c+74 -730 replies
21/36RDMA/mlx5: Promote RSS RAW QP attribute check in higher leveldrivers/infiniband/hw/mlx5/qp.c+3 -30 replies
22/36RDMA/mlx5: Combine copy of create QP command in RSS RAW QPdrivers/infiniband/hw/mlx5/qp.c+82 -740 replies
23/36RDMA/mlx5: Remove second user copy in create_user_qpdrivers/infiniband/hw/mlx5/qp.c+15 -190 replies
24/36RDMA/mlx5: Rely on existence of udata to separate kernel/user flowsdrivers/infiniband/hw/mlx5/mlx5_ib.h drivers/infiniband/hw/mlx5/qp.c+10 -270 replies
25/36RDMA/mlx5: Delete impossible inlen checkdrivers/infiniband/hw/mlx5/qp.c+0 -70 replies
26/36RDMA/mlx5: Globally parse DEVX UIDdrivers/infiniband/hw/mlx5/qp.c+27 -240 replies
27/36RDMA/mlx5: Separate XRC_TGT QP creation from common flowdrivers/infiniband/hw/mlx5/qp.c+106 -520 replies
28/36RDMA/mlx5: Separate to user/kernel create QP flowsdrivers/infiniband/hw/mlx5/qp.c+156 -490 replies
29/36RDMA/mlx5: Reduce amount of duplication in QP destroydrivers/infiniband/hw/mlx5/qp.c+31 -390 replies
30/36RDMA/mlx5: Group all create QP parameters to simplify in-kernel interfacesdrivers/infiniband/hw/mlx5/qp.c+81 -670 replies
31/36RDMA/mlx5: Promote RSS RAW QP flags check to higher leveldrivers/infiniband/hw/mlx5/qp.c+10 -80 replies
32/36RDMA/mlx5: Handle udate outlen checks in one placedrivers/infiniband/hw/mlx5/qp.c+30 -180 replies
33/36RDMA/mlx5: Copy response to the user in one placedrivers/infiniband/hw/mlx5/qp.c+52 -610 replies
34/36RDMA/mlx5: Remove redundant destroy QP calldrivers/infiniband/hw/mlx5/qp.c+1 -40 replies
35/36RDMA/mlx5: Consolidate into special function all create QP callsdrivers/infiniband/hw/mlx5/qp.c+49 -360 replies
36/36RDMA/mlx5: Verify that QP is created with RQ or SQdrivers/infiniband/hw/mlx5/qp.c+2 -00 replies

Reviews trailers per patch

All 36 patches have a Reviewed-by or Acked-by.

PatchMaor Gottlieb
1/36R-b
2/36R-b
3/36R-b
4/36R-b
5/36R-b
6/36R-b
7/36R-b
8/36R-b
9/36R-b
10/36R-b
11/36R-b
12/36R-b
13/36R-b
14/36R-b
15/36R-b
16/36R-b
17/36R-b
18/36R-b
19/36R-b
20/36R-b
21/36R-b
22/36R-b
23/36R-b
24/36R-b
25/36R-b
26/36R-b
27/36R-b
28/36R-b
29/36R-b
30/36R-b
31/36R-b
32/36R-b
33/36R-b
34/36R-b
35/36R-b
36/36R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH rdma-next v1 00/36] Refactor mlx5_ib_create_qp

From: Leon Romanovsky <[email protected]>

Changelog
v1: * Combined both series to easy apply
* Rebsed on top of rdma-next + mlx5-next
* Fixed create_qp flags check
v0: https://lore.kernel.org/lkml/[email protected]

    https://lore.kernel.org/lkml/[email protected]

-----------------------------------------------------------------------------

Hi,

This is first part of series which tries to return some sanity to mlx5_ib_create_qp() function. Such refactoring is required to make extension of that function with less worries of breaking driver.

Extra goal of such refactoring is to ensure that QP is allocated at the beginning of function and released at the end. It will allow us to move QP allocation to be under IB/core responsibility.

It is based on previously sent [1] "[PATCH mlx5-next 00/24] Mass conversion to light mlx5 command interface"

Thanks

[1]
https://lore.kernel.org/linux-rdma/[email protected]

Aharon Landau (1):
RDMA/mlx5: Verify that QP is created with RQ or SQ

Leon Romanovsky (35):
RDMA/mlx5: Organize QP types checks in one place RDMA/mlx5: Delete impossible GSI port check
RDMA/mlx5: Perform check if QP creation flow is valid RDMA/mlx5: Prepare QP allocation for future removal RDMA/mlx5: Avoid setting redundant NULL for XRC QPs RDMA/mlx5: Set QP subtype immediately when it is known RDMA/mlx5: Separate create QP flows to be based on type RDMA/mlx5: Split scatter CQE configuration for DCT QP RDMA/mlx5: Update all DRIVER QP places to use QP subtype RDMA/mlx5: Move DRIVER QP flags check into separate function RDMA/mlx5: Remove second copy from user for non RSS RAW QPs RDMA/mlx5: Initial separation of RAW_PACKET QP from common flow RDMA/mlx5: Delete create QP flags obfuscation
RDMA/mlx5: Process create QP flags in one place RDMA/mlx5: Use flags_en mechanism to mark QP created with WQE
signature
RDMA/mlx5: Change scatter CQE flag to be set like other vendor flags RDMA/mlx5: Return all configured create flags through query QP RDMA/mlx5: Process all vendor flags in one place RDMA/mlx5: Delete unsupported QP types
RDMA/mlx5: Store QP type in the vendor QP structure RDMA/mlx5: Promote RSS RAW QP attribute check in higher level RDMA/mlx5: Combine copy of create QP command in RSS RAW QP RDMA/mlx5: Remove second user copy in create_user_qp RDMA/mlx5: Rely on existence of udata to separate kernel/user flows RDMA/mlx5: Delete impossible inlen check
RDMA/mlx5: Globally parse DEVX UID
RDMA/mlx5: Separate XRC_TGT QP creation from common flow RDMA/mlx5: Separate to user/kernel create QP flows RDMA/mlx5: Reduce amount of duplication in QP destroy RDMA/mlx5: Group all create QP parameters to simplify in-kernel
interfaces
RDMA/mlx5: Promote RSS RAW QP flags check to higher level RDMA/mlx5: Handle udate outlen checks in one place RDMA/mlx5: Copy response to the user in one place RDMA/mlx5: Remove redundant destroy QP call
RDMA/mlx5: Consolidate into special function all create QP calls

 drivers/infiniband/hw/mlx5/devx.c    |    2 +-
 drivers/infiniband/hw/mlx5/flow.c    |    2 +-
 drivers/infiniband/hw/mlx5/gsi.c     |    9 -
 drivers/infiniband/hw/mlx5/main.c    |    6 +-
 drivers/infiniband/hw/mlx5/mlx5_ib.h |   46 +-
 drivers/infiniband/hw/mlx5/odp.c     |    5 +-
 drivers/infiniband/hw/mlx5/qp.c      | 1625 ++++++++++++++------------
 7 files changed, 905 insertions(+), 790 deletions(-)

--
2.25.3