Commit Graph

8 Commits

Author SHA1 Message Date
Mohammad Kabat b788b13bee RDMA/mlx5: Use mlx5_umr_post_send_wait() to update MR pas
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit b3d47ebd490823514a2d637caee0870b6f192b07
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:24:05 2022 +0300

    RDMA/mlx5: Use mlx5_umr_post_send_wait() to update MR pas

    Move mlx5_ib_update_mr_pas logic to umr.c, and use
    mlx5_umr_post_send_wait() instead of mlx5_ib_post_send_wait().

    Link: https://lore.kernel.org/r/ed8f2ee6c64804072155d727149abf7105f92536.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:05 +00:00
Mohammad Kabat 55d25b3623 RDMA/mlx5: Move creation and free of translation tables to umr.c
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit 916adb491e84bc8b130618e4969c1d196525abf2
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:24:04 2022 +0300

    RDMA/mlx5: Move creation and free of translation tables to umr.c

    The only use of the translation tables is to update the mkey translation
    by a UMR operation. Move the responsibility of creating and freeing them
    to umr.c

    Link: https://lore.kernel.org/r/1d93f1381be82a22aaf1168cdbdfb227eac1ce62.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:05 +00:00
Mohammad Kabat 7081430569 RDMA/mlx5: Use mlx5_umr_post_send_wait() to rereg pd access
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit 483196764091621b8dd45d7af29e7a9c874a9f19
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:24:03 2022 +0300

    RDMA/mlx5: Use mlx5_umr_post_send_wait() to rereg pd access

    Move rereg_pd_access logic to umr.c, and use mlx5_umr_post_send_wait()
    instead of mlx5_ib_post_send_wait().

    Link: https://lore.kernel.org/r/18da4f47edbc2561f652b7ee4e7a5269e866af77.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:05 +00:00
Mohammad Kabat 0691a97570 RDMA/mlx5: Use mlx5_umr_post_send_wait() to revoke MRs
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit 33e8aa8e049811de87cd1c16a2ead85e0c9f9606
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:24:02 2022 +0300

    RDMA/mlx5: Use mlx5_umr_post_send_wait() to revoke MRs

    Move the revoke_mr logic to umr.c, and using mlx5_umr_post_send_wait()
    instead of mlx5_ib_post_send_wait().

    In the new implementation, do not zero out the access flags. Before
    reusing the MR, we will update it to the required access.

    Link: https://lore.kernel.org/r/63717dfdaf6007f81b3e6dbf598f5bf3875ce86f.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:05 +00:00
Mohammad Kabat c6da80b1c9 RDMA/mlx5: Introduce mlx5_umr_post_send_wait()
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit 6f0689fdf19ed3aca3ee3910223ad27216640693
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:24:01 2022 +0300

    RDMA/mlx5: Introduce mlx5_umr_post_send_wait()

    Introduce mlx5_umr_post_send_wait() that uses a UMR adjusted flow for
    posting WQEs. The next patches will gradually move UMR operations to use
    this flow. Once done, will get rid of mlx5_ib_post_send_wait().

    mlx5_umr_post_send_wait gets already written WQE segments and will only
    memcpy it to the SQ. This way, we avoid packing all the data in a WR just
    to unpack it into the WQE.

    Link: https://lore.kernel.org/r/f027dd592fde62402b2d49efded8d1d22229d22b.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:05 +00:00
Mohammad Kabat 366c2b9c62 RDMA/mlx5: Simplify get_umr_update_access_mask()
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit ba6a9c6899b2dce3c615ce9fac6bead976e43a48
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:23:59 2022 +0300

    RDMA/mlx5: Simplify get_umr_update_access_mask()

    Instead of getting the update access capabilities each call to
    get_umr_update_access_mask(), pass struct mlx5_ib_dev and get the
    capabilities inside the function.

    Link: https://lore.kernel.org/r/f22b8a84ef32e29ada26691f06b57e2ed5943b76.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:04 +00:00
Mohammad Kabat ba93e3444b RDMA/mlx5: Move mkey ctrl segment logic to umr.c
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit 8a8a5d37c7b4334ede6e7121f7b0757ec7a2e2ed
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:23:58 2022 +0300

    RDMA/mlx5: Move mkey ctrl segment logic to umr.c

    Move set_reg_umr_segment() and its helpers to umr.c.

    Link: https://lore.kernel.org/r/5a7fac8ae8543521d19d174663245ae84b910310.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:04 +00:00
Mohammad Kabat e64020b691 RDMA/mlx5: Move init and cleanup of UMR to umr.c
Bugzilla: https://bugzilla.redhat.com/2112940
Upstream-status: v5.19-rc1

commit 04876c12c19e94bbbc94bb0446c7bc7cd75163de
Author: Aharon Landau <aharonl@nvidia.com>
Date:   Tue Apr 12 10:23:56 2022 +0300

    RDMA/mlx5: Move init and cleanup of UMR to umr.c

    The first patch in a series to split UMR logic to a dedicated file.  As a
    start, move the init and cleanup of UMR resources to umr.c.

    Link: https://lore.kernel.org/r/849e632dd1945a2534712a320cc5779f2149ba96.1649747695.git.leonro@nvidia.com
    Signed-off-by: Aharon Landau <aharonl@nvidia.com>
    Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>

Signed-off-by: Mohammad Kabat <mkabat@redhat.com>
2022-12-18 10:14:04 +00:00