mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
net/mlx5: devcom, Add component size getter
Add a getter for the number of participants in a devcom component (those who share the same component id and key). Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Gal Pressman <gal@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
db52aa6df8
commit
9bb1ac8073
|
|
@ -256,6 +256,13 @@ void mlx5_devcom_unregister_component(struct mlx5_devcom_comp_dev *devcom)
|
|||
devcom_free_comp_dev(devcom);
|
||||
}
|
||||
|
||||
int mlx5_devcom_comp_get_size(struct mlx5_devcom_comp_dev *devcom)
|
||||
{
|
||||
struct mlx5_devcom_comp *comp = devcom->comp;
|
||||
|
||||
return kref_read(&comp->ref);
|
||||
}
|
||||
|
||||
int mlx5_devcom_send_event(struct mlx5_devcom_comp_dev *devcom,
|
||||
int event, int rollback_event,
|
||||
void *event_data)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ void mlx5_devcom_unregister_component(struct mlx5_devcom_comp_dev *devcom);
|
|||
int mlx5_devcom_send_event(struct mlx5_devcom_comp_dev *devcom,
|
||||
int event, int rollback_event,
|
||||
void *event_data);
|
||||
int mlx5_devcom_comp_get_size(struct mlx5_devcom_comp_dev *devcom);
|
||||
|
||||
void mlx5_devcom_comp_set_ready(struct mlx5_devcom_comp_dev *devcom, bool ready);
|
||||
bool mlx5_devcom_comp_is_ready(struct mlx5_devcom_comp_dev *devcom);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user