Contributors: 12
Author Tokens Token Proportion Commits Commit Proportion
Parav Pandit 111 45.87% 2 9.09%
Eli Cohen 85 35.12% 4 18.18%
Saeed Mahameed 15 6.20% 4 18.18%
Daniel Jurgens 14 5.79% 2 9.09%
Mohamad Haj Yahia 5 2.07% 3 13.64%
Moni Shoua 4 1.65% 1 4.55%
Ilan Tayari 2 0.83% 1 4.55%
Bodong Wang 2 0.83% 1 4.55%
Majd Dibbiny 1 0.41% 1 4.55%
Jack Morgenstein 1 0.41% 1 4.55%
Mark Bloch 1 0.41% 1 4.55%
Ariel Levkovich 1 0.41% 1 4.55%
Total 242 22


/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/* Copyright (c) 2020 Mellanox Technologies Ltd */

#ifndef __MLX5_VHCA_EVENT_H__
#define __MLX5_VHCA_EVENT_H__

#ifdef CONFIG_MLX5_SF

struct mlx5_vhca_state_event {
	u16 function_id;
	u16 sw_function_id;
	u8 new_vhca_state;
};

static inline bool mlx5_vhca_event_supported(const struct mlx5_core_dev *dev)
{
	return MLX5_CAP_GEN_MAX(dev, vhca_state);
}

void mlx5_vhca_state_cap_handle(struct mlx5_core_dev *dev, void *set_hca_cap);
int mlx5_vhca_event_init(struct mlx5_core_dev *dev);
void mlx5_vhca_event_cleanup(struct mlx5_core_dev *dev);
void mlx5_vhca_event_start(struct mlx5_core_dev *dev);
void mlx5_vhca_event_stop(struct mlx5_core_dev *dev);
int mlx5_vhca_event_notifier_register(struct mlx5_core_dev *dev, struct notifier_block *nb);
void mlx5_vhca_event_notifier_unregister(struct mlx5_core_dev *dev, struct notifier_block *nb);
int mlx5_modify_vhca_sw_id(struct mlx5_core_dev *dev, u16 function_id, u32 sw_fn_id);
int mlx5_vhca_event_arm(struct mlx5_core_dev *dev, u16 function_id);
int mlx5_cmd_query_vhca_state(struct mlx5_core_dev *dev, u16 function_id,
			      u32 *out, u32 outlen);
#else

static inline void mlx5_vhca_state_cap_handle(struct mlx5_core_dev *dev, void *set_hca_cap)
{
}

static inline int mlx5_vhca_event_init(struct mlx5_core_dev *dev)
{
	return 0;
}

static inline void mlx5_vhca_event_cleanup(struct mlx5_core_dev *dev)
{
}

static inline void mlx5_vhca_event_start(struct mlx5_core_dev *dev)
{
}

static inline void mlx5_vhca_event_stop(struct mlx5_core_dev *dev)
{
}

#endif

#endif