#include <devlink.h>
#include "mlx5_core.h"
#include "fw_reset.h"
#include "fs_core.h"
#include "eswitch.h"
#include "esw/qos.h"
#include "sf/dev/dev.h"
#include "sf/sf.h"
static int mlx5_devlink_flash_update(struct devlink *devlink,
struct devlink_flash_update_params *params,
struct netlink_ext_ack *extack)
{ … }
static u8 mlx5_fw_ver_major(u32 version)
{ … }
static u8 mlx5_fw_ver_minor(u32 version)
{ … }
static u16 mlx5_fw_ver_subminor(u32 version)
{ … }
#define DEVLINK_FW_STRING_LEN …
static int
mlx5_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,
struct netlink_ext_ack *extack)
{ … }
static int mlx5_devlink_reload_fw_activate(struct devlink *devlink, struct netlink_ext_ack *extack)
{ … }
static int mlx5_devlink_trigger_fw_live_patch(struct devlink *devlink,
struct netlink_ext_ack *extack)
{ … }
static int mlx5_devlink_reload_down(struct devlink *devlink, bool netns_change,
enum devlink_reload_action action,
enum devlink_reload_limit limit,
struct netlink_ext_ack *extack)
{ … }
static int mlx5_devlink_reload_up(struct devlink *devlink, enum devlink_reload_action action,
enum devlink_reload_limit limit, u32 *actions_performed,
struct netlink_ext_ack *extack)
{ … }
static struct mlx5_devlink_trap *mlx5_find_trap_by_id(struct mlx5_core_dev *dev, int trap_id)
{ … }
static int mlx5_devlink_trap_init(struct devlink *devlink, const struct devlink_trap *trap,
void *trap_ctx)
{ … }
static void mlx5_devlink_trap_fini(struct devlink *devlink, const struct devlink_trap *trap,
void *trap_ctx)
{ … }
static int mlx5_devlink_trap_action_set(struct devlink *devlink,
const struct devlink_trap *trap,
enum devlink_trap_action action,
struct netlink_ext_ack *extack)
{ … }
static const struct devlink_ops mlx5_devlink_ops = …;
void mlx5_devlink_trap_report(struct mlx5_core_dev *dev, int trap_id, struct sk_buff *skb,
struct devlink_port *dl_port)
{ … }
int mlx5_devlink_trap_get_num_active(struct mlx5_core_dev *dev)
{ … }
int mlx5_devlink_traps_get_action(struct mlx5_core_dev *dev, int trap_id,
enum devlink_trap_action *action)
{ … }
struct devlink *mlx5_devlink_alloc(struct device *dev)
{ … }
void mlx5_devlink_free(struct devlink *devlink)
{ … }
static int mlx5_devlink_enable_roce_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{ … }
#ifdef CONFIG_MLX5_ESWITCH
static int mlx5_devlink_large_group_num_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{ … }
#endif
static int mlx5_devlink_eq_depth_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{ … }
static int
mlx5_devlink_hairpin_num_queues_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{ … }
static int
mlx5_devlink_hairpin_queue_size_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{ … }
static void mlx5_devlink_hairpin_params_init_values(struct devlink *devlink)
{ … }
static const struct devlink_param mlx5_devlink_params[] = …;
static void mlx5_devlink_set_params_init_values(struct devlink *devlink)
{ … }
static const struct devlink_param mlx5_devlink_eth_params[] = …;
static int mlx5_devlink_eth_params_register(struct devlink *devlink)
{ … }
static void mlx5_devlink_eth_params_unregister(struct devlink *devlink)
{ … }
static int mlx5_devlink_enable_rdma_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{ … }
static const struct devlink_param mlx5_devlink_rdma_params[] = …;
static int mlx5_devlink_rdma_params_register(struct devlink *devlink)
{ … }
static void mlx5_devlink_rdma_params_unregister(struct devlink *devlink)
{ … }
static const struct devlink_param mlx5_devlink_vnet_params[] = …;
static int mlx5_devlink_vnet_params_register(struct devlink *devlink)
{ … }
static void mlx5_devlink_vnet_params_unregister(struct devlink *devlink)
{ … }
static int mlx5_devlink_auxdev_params_register(struct devlink *devlink)
{ … }
static void mlx5_devlink_auxdev_params_unregister(struct devlink *devlink)
{ … }
static int mlx5_devlink_max_uc_list_validate(struct devlink *devlink, u32 id,
union devlink_param_value val,
struct netlink_ext_ack *extack)
{ … }
static const struct devlink_param mlx5_devlink_max_uc_list_params[] = …;
static int mlx5_devlink_max_uc_list_params_register(struct devlink *devlink)
{ … }
static void
mlx5_devlink_max_uc_list_params_unregister(struct devlink *devlink)
{ … }
#define MLX5_TRAP_DROP(_id, _group_id) …
static const struct devlink_trap mlx5_traps_arr[] = …;
static const struct devlink_trap_group mlx5_trap_groups_arr[] = …;
int mlx5_devlink_traps_register(struct devlink *devlink)
{ … }
void mlx5_devlink_traps_unregister(struct devlink *devlink)
{ … }
int mlx5_devlink_params_register(struct devlink *devlink)
{ … }
void mlx5_devlink_params_unregister(struct devlink *devlink)
{ … }