#include <trace/events/devlink.h>
#include "devl_internal.h"
struct devlink_stats { … };
struct devlink_trap_policer_item { … };
struct devlink_trap_group_item { … };
struct devlink_trap_item { … };
static struct devlink_trap_policer_item *
devlink_trap_policer_item_lookup(struct devlink *devlink, u32 id)
{ … }
static struct devlink_trap_item *
devlink_trap_item_lookup(struct devlink *devlink, const char *name)
{ … }
static struct devlink_trap_item *
devlink_trap_item_get_from_info(struct devlink *devlink,
struct genl_info *info)
{ … }
static int
devlink_trap_action_get_from_info(struct genl_info *info,
enum devlink_trap_action *p_trap_action)
{ … }
static int devlink_trap_metadata_put(struct sk_buff *msg,
const struct devlink_trap *trap)
{ … }
static void devlink_trap_stats_read(struct devlink_stats __percpu *trap_stats,
struct devlink_stats *stats)
{ … }
static int
devlink_trap_group_stats_put(struct sk_buff *msg,
struct devlink_stats __percpu *trap_stats)
{ … }
static int devlink_trap_stats_put(struct sk_buff *msg, struct devlink *devlink,
const struct devlink_trap_item *trap_item)
{ … }
static int devlink_nl_trap_fill(struct sk_buff *msg, struct devlink *devlink,
const struct devlink_trap_item *trap_item,
enum devlink_command cmd, u32 portid, u32 seq,
int flags)
{ … }
int devlink_nl_trap_get_doit(struct sk_buff *skb, struct genl_info *info)
{ … }
static int devlink_nl_trap_get_dump_one(struct sk_buff *msg,
struct devlink *devlink,
struct netlink_callback *cb, int flags)
{ … }
int devlink_nl_trap_get_dumpit(struct sk_buff *skb, struct netlink_callback *cb)
{ … }
static int __devlink_trap_action_set(struct devlink *devlink,
struct devlink_trap_item *trap_item,
enum devlink_trap_action trap_action,
struct netlink_ext_ack *extack)
{ … }
static int devlink_trap_action_set(struct devlink *devlink,
struct devlink_trap_item *trap_item,
struct genl_info *info)
{ … }
int devlink_nl_trap_set_doit(struct sk_buff *skb, struct genl_info *info)
{ … }
static struct devlink_trap_group_item *
devlink_trap_group_item_lookup(struct devlink *devlink, const char *name)
{ … }
static struct devlink_trap_group_item *
devlink_trap_group_item_lookup_by_id(struct devlink *devlink, u16 id)
{ … }
static struct devlink_trap_group_item *
devlink_trap_group_item_get_from_info(struct devlink *devlink,
struct genl_info *info)
{ … }
static int
devlink_nl_trap_group_fill(struct sk_buff *msg, struct devlink *devlink,
const struct devlink_trap_group_item *group_item,
enum devlink_command cmd, u32 portid, u32 seq,
int flags)
{ … }
int devlink_nl_trap_group_get_doit(struct sk_buff *skb, struct genl_info *info)
{ … }
static int devlink_nl_trap_group_get_dump_one(struct sk_buff *msg,
struct devlink *devlink,
struct netlink_callback *cb,
int flags)
{ … }
int devlink_nl_trap_group_get_dumpit(struct sk_buff *skb,
struct netlink_callback *cb)
{ … }
static int
__devlink_trap_group_action_set(struct devlink *devlink,
struct devlink_trap_group_item *group_item,
enum devlink_trap_action trap_action,
struct netlink_ext_ack *extack)
{ … }
static int
devlink_trap_group_action_set(struct devlink *devlink,
struct devlink_trap_group_item *group_item,
struct genl_info *info, bool *p_modified)
{ … }
static int devlink_trap_group_set(struct devlink *devlink,
struct devlink_trap_group_item *group_item,
struct genl_info *info)
{ … }
int devlink_nl_trap_group_set_doit(struct sk_buff *skb, struct genl_info *info)
{ … }
static struct devlink_trap_policer_item *
devlink_trap_policer_item_get_from_info(struct devlink *devlink,
struct genl_info *info)
{ … }
static int
devlink_trap_policer_stats_put(struct sk_buff *msg, struct devlink *devlink,
const struct devlink_trap_policer *policer)
{ … }
static int
devlink_nl_trap_policer_fill(struct sk_buff *msg, struct devlink *devlink,
const struct devlink_trap_policer_item *policer_item,
enum devlink_command cmd, u32 portid, u32 seq,
int flags)
{ … }
int devlink_nl_trap_policer_get_doit(struct sk_buff *skb,
struct genl_info *info)
{ … }
static int devlink_nl_trap_policer_get_dump_one(struct sk_buff *msg,
struct devlink *devlink,
struct netlink_callback *cb,
int flags)
{ … }
int devlink_nl_trap_policer_get_dumpit(struct sk_buff *skb,
struct netlink_callback *cb)
{ … }
static int
devlink_trap_policer_set(struct devlink *devlink,
struct devlink_trap_policer_item *policer_item,
struct genl_info *info)
{ … }
int devlink_nl_trap_policer_set_doit(struct sk_buff *skb,
struct genl_info *info)
{ … }
#define DEVLINK_TRAP(_id, _type) …
static const struct devlink_trap devlink_trap_generic[] = …;
#define DEVLINK_TRAP_GROUP(_id) …
static const struct devlink_trap_group devlink_trap_group_generic[] = …;
static int devlink_trap_generic_verify(const struct devlink_trap *trap)
{ … }
static int devlink_trap_driver_verify(const struct devlink_trap *trap)
{ … }
static int devlink_trap_verify(const struct devlink_trap *trap)
{ … }
static int
devlink_trap_group_generic_verify(const struct devlink_trap_group *group)
{ … }
static int
devlink_trap_group_driver_verify(const struct devlink_trap_group *group)
{ … }
static int devlink_trap_group_verify(const struct devlink_trap_group *group)
{ … }
static void
devlink_trap_group_notify(struct devlink *devlink,
const struct devlink_trap_group_item *group_item,
enum devlink_command cmd)
{ … }
void devlink_trap_groups_notify_register(struct devlink *devlink)
{ … }
void devlink_trap_groups_notify_unregister(struct devlink *devlink)
{ … }
static int
devlink_trap_item_group_link(struct devlink *devlink,
struct devlink_trap_item *trap_item)
{ … }
static void devlink_trap_notify(struct devlink *devlink,
const struct devlink_trap_item *trap_item,
enum devlink_command cmd)
{ … }
void devlink_traps_notify_register(struct devlink *devlink)
{ … }
void devlink_traps_notify_unregister(struct devlink *devlink)
{ … }
static int
devlink_trap_register(struct devlink *devlink,
const struct devlink_trap *trap, void *priv)
{ … }
static void devlink_trap_unregister(struct devlink *devlink,
const struct devlink_trap *trap)
{ … }
static void devlink_trap_disable(struct devlink *devlink,
const struct devlink_trap *trap)
{ … }
int devl_traps_register(struct devlink *devlink,
const struct devlink_trap *traps,
size_t traps_count, void *priv)
{ … }
EXPORT_SYMBOL_GPL(…);
int devlink_traps_register(struct devlink *devlink,
const struct devlink_trap *traps,
size_t traps_count, void *priv)
{ … }
EXPORT_SYMBOL_GPL(…);
void devl_traps_unregister(struct devlink *devlink,
const struct devlink_trap *traps,
size_t traps_count)
{ … }
EXPORT_SYMBOL_GPL(…);
void devlink_traps_unregister(struct devlink *devlink,
const struct devlink_trap *traps,
size_t traps_count)
{ … }
EXPORT_SYMBOL_GPL(…);
static void
devlink_trap_stats_update(struct devlink_stats __percpu *trap_stats,
size_t skb_len)
{ … }
static void
devlink_trap_report_metadata_set(struct devlink_trap_metadata *metadata,
const struct devlink_trap_item *trap_item,
struct devlink_port *in_devlink_port,
const struct flow_action_cookie *fa_cookie)
{ … }
void devlink_trap_report(struct devlink *devlink, struct sk_buff *skb,
void *trap_ctx, struct devlink_port *in_devlink_port,
const struct flow_action_cookie *fa_cookie)
{ … }
EXPORT_SYMBOL_GPL(…);
void *devlink_trap_ctx_priv(void *trap_ctx)
{ … }
EXPORT_SYMBOL_GPL(…);
static int
devlink_trap_group_item_policer_link(struct devlink *devlink,
struct devlink_trap_group_item *group_item)
{ … }
static int
devlink_trap_group_register(struct devlink *devlink,
const struct devlink_trap_group *group)
{ … }
static void
devlink_trap_group_unregister(struct devlink *devlink,
const struct devlink_trap_group *group)
{ … }
int devl_trap_groups_register(struct devlink *devlink,
const struct devlink_trap_group *groups,
size_t groups_count)
{ … }
EXPORT_SYMBOL_GPL(…);
int devlink_trap_groups_register(struct devlink *devlink,
const struct devlink_trap_group *groups,
size_t groups_count)
{ … }
EXPORT_SYMBOL_GPL(…);
void devl_trap_groups_unregister(struct devlink *devlink,
const struct devlink_trap_group *groups,
size_t groups_count)
{ … }
EXPORT_SYMBOL_GPL(…);
void devlink_trap_groups_unregister(struct devlink *devlink,
const struct devlink_trap_group *groups,
size_t groups_count)
{ … }
EXPORT_SYMBOL_GPL(…);
static void
devlink_trap_policer_notify(struct devlink *devlink,
const struct devlink_trap_policer_item *policer_item,
enum devlink_command cmd)
{ … }
void devlink_trap_policers_notify_register(struct devlink *devlink)
{ … }
void devlink_trap_policers_notify_unregister(struct devlink *devlink)
{ … }
static int
devlink_trap_policer_register(struct devlink *devlink,
const struct devlink_trap_policer *policer)
{ … }
static void
devlink_trap_policer_unregister(struct devlink *devlink,
const struct devlink_trap_policer *policer)
{ … }
int
devl_trap_policers_register(struct devlink *devlink,
const struct devlink_trap_policer *policers,
size_t policers_count)
{ … }
EXPORT_SYMBOL_GPL(…);
void
devl_trap_policers_unregister(struct devlink *devlink,
const struct devlink_trap_policer *policers,
size_t policers_count)
{ … }
EXPORT_SYMBOL_GPL(…);