net/mlx5: add memory region callbacks in per-device cache
authorOphir Munk <ophirmu@mellanox.com>
Tue, 16 Jun 2020 09:44:45 +0000 (09:44 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 17 Jun 2020 14:32:01 +0000 (16:32 +0200)
commitd5ed8aa9449d5a4d5772333c5196f89b7337fcbb
treea8bddda44b5b61b0a83c65924d2a71e93bb4917b
parent58a17853b5991092da557538d5acc7bc365ba12e
net/mlx5: add memory region callbacks in per-device cache

Prior to this commit MR operations were verbs based and hard coded under
common/mlx5/linux directory. This commit enables upper layers (e.g.
net/mlx5) to determine which MR operations to use. For example the net
layer could set devx based MR operations in non-Linux environments. The
reg_mr and dereg_mr callbacks are added to the global per-device MR
cache 'struct mlx5_mr_share_cache'.

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/common/mlx5/mlx5_common_mr.c
drivers/common/mlx5/mlx5_common_mr.h
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_mr.c