]> git.droids-corp.org - dpdk.git/commit
common/mlx5: fix redundant field in MR control structure
authorMichael Baum <michaelba@nvidia.com>
Tue, 16 Nov 2021 14:36:35 +0000 (16:36 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 17 Nov 2021 09:42:20 +0000 (10:42 +0100)
commit71304b5c7b4c7c9892ce416a74318bb589e0798f
tree619ca448036c937dc00e35609a933faeff02e77f
parentb7fc82ecb08b94a2b797c5e997240997e6975288
common/mlx5: fix redundant field in MR control structure

Inside the MR control structure there is a pointer to the common device.
This pointer enables access to the global cache as well as hardware
objects that may be required in case a new MR needs to be created.

The purpose of adding this pointer into the MR control structure was to
avoid its transfer as a parameter to all the functions of searching MR
in the caches.
However, adding it to this structure increased the Rx and Tx data-path
structures, all the fields that followed it were slightly moved away
which caused to a reduction in performance.

This patch removes the pointer from the structure. It can be accessed
through the "dev_gen_ptr" existing field using the "container_of"
operator.

Fixes: 334ed198ab4d ("common/mlx5: remove redundant parameter in MR search")
Signed-off-by: Michael Baum <michaelba@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_txq.c
drivers/regex/mlx5/mlx5_regex_control.c