linux/net/devlink/health.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
 * Copyright (c) 2016 Jiri Pirko <[email protected]>
 */

#include <net/genetlink.h>
#include <net/sock.h>
#include <trace/events/devlink.h>
#include "devl_internal.h"

struct devlink_fmsg_item {};

struct devlink_fmsg {};

static struct devlink_fmsg *devlink_fmsg_alloc(void)
{}

static void devlink_fmsg_free(struct devlink_fmsg *fmsg)
{}

struct devlink_health_reporter {};

void *
devlink_health_reporter_priv(struct devlink_health_reporter *reporter)
{}
EXPORT_SYMBOL_GPL();

static struct devlink_health_reporter *
__devlink_health_reporter_find_by_name(struct list_head *reporter_list,
				       const char *reporter_name)
{}

static struct devlink_health_reporter *
devlink_health_reporter_find_by_name(struct devlink *devlink,
				     const char *reporter_name)
{}

static struct devlink_health_reporter *
devlink_port_health_reporter_find_by_name(struct devlink_port *devlink_port,
					  const char *reporter_name)
{}

static struct devlink_health_reporter *
__devlink_health_reporter_create(struct devlink *devlink,
				 const struct devlink_health_reporter_ops *ops,
				 u64 graceful_period, void *priv)
{}

/**
 * devl_port_health_reporter_create() - create devlink health reporter for
 *                                      specified port instance
 *
 * @port: devlink_port to which health reports will relate
 * @ops: devlink health reporter ops
 * @graceful_period: min time (in msec) between recovery attempts
 * @priv: driver priv pointer
 */
struct devlink_health_reporter *
devl_port_health_reporter_create(struct devlink_port *port,
				 const struct devlink_health_reporter_ops *ops,
				 u64 graceful_period, void *priv)
{}
EXPORT_SYMBOL_GPL();

struct devlink_health_reporter *
devlink_port_health_reporter_create(struct devlink_port *port,
				    const struct devlink_health_reporter_ops *ops,
				    u64 graceful_period, void *priv)
{}
EXPORT_SYMBOL_GPL();

/**
 * devl_health_reporter_create - create devlink health reporter
 *
 * @devlink: devlink instance which the health reports will relate
 * @ops: devlink health reporter ops
 * @graceful_period: min time (in msec) between recovery attempts
 * @priv: driver priv pointer
 */
struct devlink_health_reporter *
devl_health_reporter_create(struct devlink *devlink,
			    const struct devlink_health_reporter_ops *ops,
			    u64 graceful_period, void *priv)
{}
EXPORT_SYMBOL_GPL();

struct devlink_health_reporter *
devlink_health_reporter_create(struct devlink *devlink,
			       const struct devlink_health_reporter_ops *ops,
			       u64 graceful_period, void *priv)
{}
EXPORT_SYMBOL_GPL();

static void
devlink_health_reporter_free(struct devlink_health_reporter *reporter)
{}

/**
 * devl_health_reporter_destroy() - destroy devlink health reporter
 *
 * @reporter: devlink health reporter to destroy
 */
void
devl_health_reporter_destroy(struct devlink_health_reporter *reporter)
{}
EXPORT_SYMBOL_GPL();

void
devlink_health_reporter_destroy(struct devlink_health_reporter *reporter)
{}
EXPORT_SYMBOL_GPL();

static int
devlink_nl_health_reporter_fill(struct sk_buff *msg,
				struct devlink_health_reporter *reporter,
				enum devlink_command cmd, u32 portid,
				u32 seq, int flags)
{}

static struct devlink_health_reporter *
devlink_health_reporter_get_from_attrs(struct devlink *devlink,
				       struct nlattr **attrs)
{}

static struct devlink_health_reporter *
devlink_health_reporter_get_from_info(struct devlink *devlink,
				      struct genl_info *info)
{}

int devlink_nl_health_reporter_get_doit(struct sk_buff *skb,
					struct genl_info *info)
{}

static int devlink_nl_health_reporter_get_dump_one(struct sk_buff *msg,
						   struct devlink *devlink,
						   struct netlink_callback *cb,
						   int flags)
{}

int devlink_nl_health_reporter_get_dumpit(struct sk_buff *skb,
					  struct netlink_callback *cb)
{}

int devlink_nl_health_reporter_set_doit(struct sk_buff *skb,
					struct genl_info *info)
{}

static void devlink_recover_notify(struct devlink_health_reporter *reporter,
				   enum devlink_command cmd)
{}

void
devlink_health_reporter_recovery_done(struct devlink_health_reporter *reporter)
{}
EXPORT_SYMBOL_GPL();

static int
devlink_health_reporter_recover(struct devlink_health_reporter *reporter,
				void *priv_ctx, struct netlink_ext_ack *extack)
{}

static void
devlink_health_dump_clear(struct devlink_health_reporter *reporter)
{}

static int devlink_health_do_dump(struct devlink_health_reporter *reporter,
				  void *priv_ctx,
				  struct netlink_ext_ack *extack)
{}

int devlink_health_report(struct devlink_health_reporter *reporter,
			  const char *msg, void *priv_ctx)
{}
EXPORT_SYMBOL_GPL();

void
devlink_health_reporter_state_update(struct devlink_health_reporter *reporter,
				     enum devlink_health_reporter_state state)
{}
EXPORT_SYMBOL_GPL();

int devlink_nl_health_reporter_recover_doit(struct sk_buff *skb,
					    struct genl_info *info)
{}

static void devlink_fmsg_err_if_binary(struct devlink_fmsg *fmsg)
{}

static void devlink_fmsg_nest_common(struct devlink_fmsg *fmsg, int attrtype)
{}

void devlink_fmsg_obj_nest_start(struct devlink_fmsg *fmsg)
{}
EXPORT_SYMBOL_GPL();

static void devlink_fmsg_nest_end(struct devlink_fmsg *fmsg)
{}

void devlink_fmsg_obj_nest_end(struct devlink_fmsg *fmsg)
{}
EXPORT_SYMBOL_GPL();

#define DEVLINK_FMSG_MAX_SIZE

static void devlink_fmsg_put_name(struct devlink_fmsg *fmsg, const char *name)
{}

void devlink_fmsg_pair_nest_start(struct devlink_fmsg *fmsg, const char *name)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_pair_nest_end(struct devlink_fmsg *fmsg)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_arr_pair_nest_start(struct devlink_fmsg *fmsg,
				      const char *name)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_arr_pair_nest_end(struct devlink_fmsg *fmsg)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_binary_pair_nest_start(struct devlink_fmsg *fmsg,
					 const char *name)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_binary_pair_nest_end(struct devlink_fmsg *fmsg)
{}
EXPORT_SYMBOL_GPL();

static void devlink_fmsg_put_value(struct devlink_fmsg *fmsg,
				   const void *value, u16 value_len,
				   u8 value_nla_type)
{}

static void devlink_fmsg_bool_put(struct devlink_fmsg *fmsg, bool value)
{}

static void devlink_fmsg_u8_put(struct devlink_fmsg *fmsg, u8 value)
{}

void devlink_fmsg_u32_put(struct devlink_fmsg *fmsg, u32 value)
{}
EXPORT_SYMBOL_GPL();

static void devlink_fmsg_u64_put(struct devlink_fmsg *fmsg, u64 value)
{}

void devlink_fmsg_string_put(struct devlink_fmsg *fmsg, const char *value)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_binary_put(struct devlink_fmsg *fmsg, const void *value,
			     u16 value_len)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_bool_pair_put(struct devlink_fmsg *fmsg, const char *name,
				bool value)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_u8_pair_put(struct devlink_fmsg *fmsg, const char *name,
			      u8 value)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_u32_pair_put(struct devlink_fmsg *fmsg, const char *name,
			       u32 value)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_u64_pair_put(struct devlink_fmsg *fmsg, const char *name,
			       u64 value)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_string_pair_put(struct devlink_fmsg *fmsg, const char *name,
				  const char *value)
{}
EXPORT_SYMBOL_GPL();

void devlink_fmsg_binary_pair_put(struct devlink_fmsg *fmsg, const char *name,
				  const void *value, u32 value_len)
{}
EXPORT_SYMBOL_GPL();

static int
devlink_fmsg_item_fill_type(struct devlink_fmsg_item *msg, struct sk_buff *skb)
{}

static int
devlink_fmsg_item_fill_data(struct devlink_fmsg_item *msg, struct sk_buff *skb)
{}

static int
devlink_fmsg_prepare_skb(struct devlink_fmsg *fmsg, struct sk_buff *skb,
			 int *start)
{}

static int devlink_fmsg_snd(struct devlink_fmsg *fmsg,
			    struct genl_info *info,
			    enum devlink_command cmd, int flags)
{}

static int devlink_fmsg_dumpit(struct devlink_fmsg *fmsg, struct sk_buff *skb,
			       struct netlink_callback *cb,
			       enum devlink_command cmd)
{}

int devlink_nl_health_reporter_diagnose_doit(struct sk_buff *skb,
					     struct genl_info *info)
{}

static struct devlink_health_reporter *
devlink_health_reporter_get_from_cb_lock(struct netlink_callback *cb)
{}

int devlink_nl_health_reporter_dump_get_dumpit(struct sk_buff *skb,
					       struct netlink_callback *cb)
{}

int devlink_nl_health_reporter_dump_clear_doit(struct sk_buff *skb,
					       struct genl_info *info)
{}

int devlink_nl_health_reporter_test_doit(struct sk_buff *skb,
					 struct genl_info *info)
{}