#include <linux/mlx5/driver.h>
#include <linux/mlx5/device.h>
#include "mlx5_core.h"
#include "dev.h"
#include "sf/vhca_event.h"
#include "sf/sf.h"
#include "sf/mlx5_ifc_vhca_event.h"
#include "ecpf.h"
#define CREATE_TRACE_POINTS
#include "diag/dev_tracepoint.h"
struct mlx5_sf_dev_table { … };
struct mlx5_sf_dev_active_work_ctx { … };
static bool mlx5_sf_dev_supported(const struct mlx5_core_dev *dev)
{ … }
bool mlx5_sf_dev_allocated(const struct mlx5_core_dev *dev)
{ … }
static ssize_t sfnum_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(sfnum);
static struct attribute *sf_device_attrs[] = …;
static const struct attribute_group sf_attr_group = …;
static const struct attribute_group *sf_attr_groups[2] = …;
static void mlx5_sf_dev_release(struct device *device)
{ … }
static void mlx5_sf_dev_remove_aux(struct mlx5_core_dev *dev,
struct mlx5_sf_dev *sf_dev)
{ … }
static void mlx5_sf_dev_add(struct mlx5_core_dev *dev, u16 sf_index, u16 fn_id, u32 sfnum)
{ … }
static void mlx5_sf_dev_del(struct mlx5_core_dev *dev, struct mlx5_sf_dev *sf_dev, u16 sf_index)
{ … }
static int
mlx5_sf_dev_state_change_handler(struct notifier_block *nb, unsigned long event_code, void *data)
{ … }
static int mlx5_sf_dev_vhca_arm_all(struct mlx5_sf_dev_table *table)
{ … }
static void mlx5_sf_dev_add_active_work(struct work_struct *_work)
{ … }
static void mlx5_sf_dev_queue_active_works(struct work_struct *_work)
{ … }
static int mlx5_sf_dev_create_active_works(struct mlx5_sf_dev_table *table)
{ … }
static void mlx5_sf_dev_destroy_active_works(struct mlx5_sf_dev_table *table)
{ … }
void mlx5_sf_dev_table_create(struct mlx5_core_dev *dev)
{ … }
static void mlx5_sf_dev_destroy_all(struct mlx5_sf_dev_table *table)
{ … }
void mlx5_sf_dev_table_destroy(struct mlx5_core_dev *dev)
{ … }