-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx5: Introduce API for request and release IRQs
Introduce new API that will allow IRQs users to hold a pointer to mlx5_irq. In the end of this series, IRQs will be allocated on demand. Hence, this will allow us to properly manage and use IRQs. Signed-off-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
- Loading branch information
Shay Drory
authored and
Saeed Mahameed
committed
Jun 15, 2021
1 parent
c38421a
commit 3b43190
Showing
7 changed files
with
68 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ | ||
/* Copyright (c) 2021 Mellanox Technologies. */ | ||
|
||
#ifndef __MLX5_IRQ_H__ | ||
#define __MLX5_IRQ_H__ | ||
|
||
#include <linux/mlx5/driver.h> | ||
|
||
struct mlx5_irq; | ||
|
||
int mlx5_irq_table_init(struct mlx5_core_dev *dev); | ||
void mlx5_irq_table_cleanup(struct mlx5_core_dev *dev); | ||
int mlx5_irq_table_create(struct mlx5_core_dev *dev); | ||
void mlx5_irq_table_destroy(struct mlx5_core_dev *dev); | ||
struct cpu_rmap *mlx5_irq_get_rmap(struct mlx5_irq_table *table); | ||
int mlx5_irq_get_num_comp(struct mlx5_irq_table *table); | ||
struct mlx5_irq_table *mlx5_irq_table_get(struct mlx5_core_dev *dev); | ||
|
||
int mlx5_set_msix_vec_count(struct mlx5_core_dev *dev, int devfn, | ||
int msix_vec_count); | ||
int mlx5_get_default_msix_vec_count(struct mlx5_core_dev *dev, int num_vfs); | ||
|
||
struct mlx5_irq *mlx5_irq_request(struct mlx5_core_dev *dev, int vecidx); | ||
void mlx5_irq_release(struct mlx5_irq *irq); | ||
int mlx5_irq_attach_nb(struct mlx5_irq *irq, struct notifier_block *nb); | ||
int mlx5_irq_detach_nb(struct mlx5_irq *irq, struct notifier_block *nb); | ||
struct cpumask * | ||
mlx5_irq_get_affinity_mask(struct mlx5_irq_table *irq_table, int vecidx); | ||
|
||
#endif /* __MLX5_IRQ_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters