linux/drivers/net/ethernet/mellanox/mlx5/core/lib/sf.h

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

#ifndef __LIB_MLX5_SF_H__
#define __LIB_MLX5_SF_H__

#include <linux/mlx5/driver.h>

static inline u16 mlx5_sf_start_function_id(const struct mlx5_core_dev *dev)
{}

#ifdef CONFIG_MLX5_SF

static inline bool mlx5_sf_supported(const struct mlx5_core_dev *dev)
{}

static inline u16 mlx5_sf_max_functions(const struct mlx5_core_dev *dev)
{}

#else

static inline bool mlx5_sf_supported(const struct mlx5_core_dev *dev)
{
	return false;
}

static inline u16 mlx5_sf_max_functions(const struct mlx5_core_dev *dev)
{
	return 0;
}

#endif

#endif