]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Add interface to get reference to a UAR
authorEli Cohen <eli@mellanox.com>
Tue, 3 Jan 2017 21:55:24 +0000 (23:55 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 9 Jan 2017 18:24:55 +0000 (20:24 +0200)
commit0bc36eb1c4aec4386acd29fd9c24e8f6ad1009cc
tree2abb26bf5a267973ebe6b2d48af0faa5ce340cd7
parent8ba998e73b97a67e217848ecfb60b45bff8b4a92
net/mlx5: Add interface to get reference to a UAR

A reference to a UAR is required to generate CQ or EQ doorbells. Since
CQ or EQ doorbells can all be generated using the same UAR area without
any effect on performance, we are just getting a reference to any
available UAR, If one is not available we allocate it but we don't waste
the blue flame registers it can provide and we will use them for
subsequent allocations.
We get a reference to such UAR and put in mlx5_priv so any kernel
consumer can make use of it.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/uar.c
include/linux/mlx5/driver.h