common/mlx5: remove redundant parameter in MR search
authorMichael Baum <michaelba@nvidia.com>
Wed, 3 Nov 2021 10:17:06 +0000 (12:17 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 7 Nov 2021 13:11:16 +0000 (14:11 +0100)
commit334ed198ab4d22f249d7b8274568253df33914a6
treef253b83952dc88f5c744b9419f4a169930e558df
parent6a4e4385767b598c41b6e97e8984907b373cd276
common/mlx5: remove redundant parameter in MR search

Memory region management has recently been shared between drivers,
including the search for caches in the data plane.
The initial search in the local linear cache of the queue, usually
yields a result and one should not continue searching in the next level
caches.

The function that searches in the local cache gets the pointer to a
device as a parameter, that is not necessary for its operation
but for subsequent searches (which, as mentioned, usually do not
happen).
Transferring the device to a function and maintaining it, takes some
time and causes some impact on performance.

Add the pointer to the device as a field of the mr_ctrl structure. The
field will be updated during control path and will be used only when
needed in the search.

Fixes: fc59a1ec556b ("common/mlx5: share MR mempool registration")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Reviewed-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_common_mr.c
drivers/common/mlx5/mlx5_common_mr.h
drivers/compress/mlx5/mlx5_compress.c
drivers/crypto/mlx5/mlx5_crypto.c
drivers/net/mlx5/mlx5_rx.h
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_tx.h
drivers/net/mlx5/mlx5_txq.c
drivers/regex/mlx5/mlx5_regex_control.c
drivers/regex/mlx5/mlx5_regex_fastpath.c