mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
net/mlx5: Store the global doorbell in mlx5_priv
The global doorbell is used for more than just Ethernet resources, so move it out of mlx5e_hw_objs into a common place (mlx5_priv), to avoid non-Ethernet modules (e.g. HWS, ASO) depending on Ethernet structs. Use this opportunity to consolidate it with the 'uar' pointer already there, which was used as an RX doorbell. Underneath the 'uar' pointer is identical to 'bfreg->up', so store a single resource and use that instead. For CQ doorbells, care is taken to always use bfreg->up->index instead of bfreg->index, which may refer to a subsequent UAR page from the same ALLOC_UAR batch on some NICs. This paves the way for cleanly supporting multiple doorbells in the Ethernet driver. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
913d28f8a7
commit
aa4595d0ad
@@ -612,7 +612,7 @@ struct mlx5_priv {
|
||||
struct mlx5_ft_pool *ft_pool;
|
||||
|
||||
struct mlx5_bfreg_data bfregs;
|
||||
struct mlx5_uars_page *uar;
|
||||
struct mlx5_sq_bfreg bfreg;
|
||||
#ifdef CONFIG_MLX5_SF
|
||||
struct mlx5_vhca_state_notifier *vhca_state_notifier;
|
||||
struct mlx5_sf_dev_table *sf_dev_table;
|
||||
@@ -658,7 +658,6 @@ struct mlx5e_resources {
|
||||
u32 pdn;
|
||||
struct mlx5_td td;
|
||||
u32 mkey;
|
||||
struct mlx5_sq_bfreg bfreg;
|
||||
#define MLX5_MAX_NUM_TC 8
|
||||
u32 tisn[MLX5_MAX_PORTS][MLX5_MAX_NUM_TC];
|
||||
bool tisn_valid;
|
||||
|
||||
Reference in New Issue
Block a user