net/mlx5: add reference counter on memory region
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Mon, 9 Oct 2017 14:44:45 +0000 (16:44 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 12 Oct 2017 00:36:58 +0000 (01:36 +0100)
commitf8fb87d51f0f69a9bb7eee436a331aa93336c9fa
tree63af31d94b9ebfed9f160d8596bfce0aab04b71f
parent9c7dd1ccaf6e361f5a1c76dfdfd8713afda33905
net/mlx5: add reference counter on memory region

This patch introduce the Memory region as a shared object where users
should get a reference to it by calling the priv_mr_get() or
priv_mr_new() to create the memory region.  This last one will
register the memory pool in the kernel driver and retrieve the
associated memory region.

This should help to reduce the memory consumption cause by registering
multiple times the same memory pool.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_mr.c
drivers/net/mlx5/mlx5_rxq.c
drivers/net/mlx5/mlx5_rxtx.h
drivers/net/mlx5/mlx5_txq.c