linux/net/devlink/sb.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 "devl_internal.h"

struct devlink_sb {};

static u16 devlink_sb_pool_count(struct devlink_sb *devlink_sb)
{}

static struct devlink_sb *devlink_sb_get_by_index(struct devlink *devlink,
						  unsigned int sb_index)
{}

static bool devlink_sb_index_exists(struct devlink *devlink,
				    unsigned int sb_index)
{}

static struct devlink_sb *devlink_sb_get_from_attrs(struct devlink *devlink,
						    struct nlattr **attrs)
{}

static struct devlink_sb *devlink_sb_get_from_info(struct devlink *devlink,
						   struct genl_info *info)
{}

static int devlink_sb_pool_index_get_from_attrs(struct devlink_sb *devlink_sb,
						struct nlattr **attrs,
						u16 *p_pool_index)
{}

static int devlink_sb_pool_index_get_from_info(struct devlink_sb *devlink_sb,
					       struct genl_info *info,
					       u16 *p_pool_index)
{}

static int
devlink_sb_pool_type_get_from_attrs(struct nlattr **attrs,
				    enum devlink_sb_pool_type *p_pool_type)
{}

static int
devlink_sb_pool_type_get_from_info(struct genl_info *info,
				   enum devlink_sb_pool_type *p_pool_type)
{}

static int
devlink_sb_th_type_get_from_attrs(struct nlattr **attrs,
				  enum devlink_sb_threshold_type *p_th_type)
{}

static int
devlink_sb_th_type_get_from_info(struct genl_info *info,
				 enum devlink_sb_threshold_type *p_th_type)
{}

static int
devlink_sb_tc_index_get_from_attrs(struct devlink_sb *devlink_sb,
				   struct nlattr **attrs,
				   enum devlink_sb_pool_type pool_type,
				   u16 *p_tc_index)
{}

static int
devlink_sb_tc_index_get_from_info(struct devlink_sb *devlink_sb,
				  struct genl_info *info,
				  enum devlink_sb_pool_type pool_type,
				  u16 *p_tc_index)
{}

static int devlink_nl_sb_fill(struct sk_buff *msg, struct devlink *devlink,
			      struct devlink_sb *devlink_sb,
			      enum devlink_command cmd, u32 portid,
			      u32 seq, int flags)
{}

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

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

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

static int devlink_nl_sb_pool_fill(struct sk_buff *msg, struct devlink *devlink,
				   struct devlink_sb *devlink_sb,
				   u16 pool_index, enum devlink_command cmd,
				   u32 portid, u32 seq, int flags)
{}

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

static int __sb_pool_get_dumpit(struct sk_buff *msg, int start, int *p_idx,
				struct devlink *devlink,
				struct devlink_sb *devlink_sb,
				u32 portid, u32 seq, int flags)
{}

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

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

static int devlink_sb_pool_set(struct devlink *devlink, unsigned int sb_index,
			       u16 pool_index, u32 size,
			       enum devlink_sb_threshold_type threshold_type,
			       struct netlink_ext_ack *extack)

{}

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

static int devlink_nl_sb_port_pool_fill(struct sk_buff *msg,
					struct devlink *devlink,
					struct devlink_port *devlink_port,
					struct devlink_sb *devlink_sb,
					u16 pool_index,
					enum devlink_command cmd,
					u32 portid, u32 seq, int flags)
{}

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

static int __sb_port_pool_get_dumpit(struct sk_buff *msg, int start, int *p_idx,
				     struct devlink *devlink,
				     struct devlink_sb *devlink_sb,
				     u32 portid, u32 seq, int flags)
{}

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

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

static int devlink_sb_port_pool_set(struct devlink_port *devlink_port,
				    unsigned int sb_index, u16 pool_index,
				    u32 threshold,
				    struct netlink_ext_ack *extack)

{}

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

static int
devlink_nl_sb_tc_pool_bind_fill(struct sk_buff *msg, struct devlink *devlink,
				struct devlink_port *devlink_port,
				struct devlink_sb *devlink_sb, u16 tc_index,
				enum devlink_sb_pool_type pool_type,
				enum devlink_command cmd,
				u32 portid, u32 seq, int flags)
{}

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

static int __sb_tc_pool_bind_get_dumpit(struct sk_buff *msg,
					int start, int *p_idx,
					struct devlink *devlink,
					struct devlink_sb *devlink_sb,
					u32 portid, u32 seq, int flags)
{}

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

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

static int devlink_sb_tc_pool_bind_set(struct devlink_port *devlink_port,
				       unsigned int sb_index, u16 tc_index,
				       enum devlink_sb_pool_type pool_type,
				       u16 pool_index, u32 threshold,
				       struct netlink_ext_ack *extack)

{}

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

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

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

int devl_sb_register(struct devlink *devlink, unsigned int sb_index,
		     u32 size, u16 ingress_pools_count,
		     u16 egress_pools_count, u16 ingress_tc_count,
		     u16 egress_tc_count)
{}
EXPORT_SYMBOL_GPL();

int devlink_sb_register(struct devlink *devlink, unsigned int sb_index,
			u32 size, u16 ingress_pools_count,
			u16 egress_pools_count, u16 ingress_tc_count,
			u16 egress_tc_count)
{}
EXPORT_SYMBOL_GPL();

void devl_sb_unregister(struct devlink *devlink, unsigned int sb_index)
{}
EXPORT_SYMBOL_GPL();

void devlink_sb_unregister(struct devlink *devlink, unsigned int sb_index)
{}
EXPORT_SYMBOL_GPL();