Contributors: 6
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Aviv Heller |
159 |
85.03% |
4 |
40.00% |
Eli Cohen |
17 |
9.09% |
1 |
10.00% |
Mark Bloch |
4 |
2.14% |
1 |
10.00% |
Vlad Buslov |
3 |
1.60% |
1 |
10.00% |
Majd Dibbiny |
2 |
1.07% |
2 |
20.00% |
Roi Dayan |
2 |
1.07% |
1 |
10.00% |
Total |
187 |
|
10 |
|
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
/* Copyright (c) 2018 Mellanox Technologies */
#ifndef __LIB_MLX5_DEVCOM_H__
#define __LIB_MLX5_DEVCOM_H__
#include <linux/mlx5/driver.h>
#define MLX5_DEVCOM_PORTS_SUPPORTED 2
enum mlx5_devcom_components {
MLX5_DEVCOM_ESW_OFFLOADS,
MLX5_DEVCOM_NUM_COMPONENTS,
};
typedef int (*mlx5_devcom_event_handler_t)(int event,
void *my_data,
void *event_data);
struct mlx5_devcom *mlx5_devcom_register_device(struct mlx5_core_dev *dev);
void mlx5_devcom_unregister_device(struct mlx5_devcom *devcom);
void mlx5_devcom_register_component(struct mlx5_devcom *devcom,
enum mlx5_devcom_components id,
mlx5_devcom_event_handler_t handler,
void *data);
void mlx5_devcom_unregister_component(struct mlx5_devcom *devcom,
enum mlx5_devcom_components id);
int mlx5_devcom_send_event(struct mlx5_devcom *devcom,
enum mlx5_devcom_components id,
int event,
void *event_data);
void mlx5_devcom_set_paired(struct mlx5_devcom *devcom,
enum mlx5_devcom_components id,
bool paired);
bool mlx5_devcom_is_paired(struct mlx5_devcom *devcom,
enum mlx5_devcom_components id);
void *mlx5_devcom_get_peer_data(struct mlx5_devcom *devcom,
enum mlx5_devcom_components id);
void *mlx5_devcom_get_peer_data_rcu(struct mlx5_devcom *devcom, enum mlx5_devcom_components id);
void mlx5_devcom_release_peer_data(struct mlx5_devcom *devcom,
enum mlx5_devcom_components id);
#endif