linux/net/devlink/linecard.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_linecard {};

unsigned int devlink_linecard_index(struct devlink_linecard *linecard)
{}

static struct devlink_linecard *
devlink_linecard_get_by_index(struct devlink *devlink,
			      unsigned int linecard_index)
{}

static bool devlink_linecard_index_exists(struct devlink *devlink,
					  unsigned int linecard_index)
{}

static struct devlink_linecard *
devlink_linecard_get_from_attrs(struct devlink *devlink, struct nlattr **attrs)
{}

static struct devlink_linecard *
devlink_linecard_get_from_info(struct devlink *devlink, struct genl_info *info)
{}

struct devlink_linecard_type {};

static int devlink_nl_linecard_fill(struct sk_buff *msg,
				    struct devlink *devlink,
				    struct devlink_linecard *linecard,
				    enum devlink_command cmd, u32 portid,
				    u32 seq, int flags,
				    struct netlink_ext_ack *extack)
{}

static void devlink_linecard_notify(struct devlink_linecard *linecard,
				    enum devlink_command cmd)
{}

void devlink_linecards_notify_register(struct devlink *devlink)
{}

void devlink_linecards_notify_unregister(struct devlink *devlink)
{}

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

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

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

static struct devlink_linecard_type *
devlink_linecard_type_lookup(struct devlink_linecard *linecard,
			     const char *type)
{}

static int devlink_linecard_type_set(struct devlink_linecard *linecard,
				     const char *type,
				     struct netlink_ext_ack *extack)
{}

static int devlink_linecard_type_unset(struct devlink_linecard *linecard,
				       struct netlink_ext_ack *extack)
{}

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

static int devlink_linecard_types_init(struct devlink_linecard *linecard)
{}

static void devlink_linecard_types_fini(struct devlink_linecard *linecard)
{}

/**
 *	devl_linecard_create - Create devlink linecard
 *
 *	@devlink: devlink
 *	@linecard_index: driver-specific numerical identifier of the linecard
 *	@ops: linecards ops
 *	@priv: user priv pointer
 *
 *	Create devlink linecard instance with provided linecard index.
 *	Caller can use any indexing, even hw-related one.
 *
 *	Return: Line card structure or an ERR_PTR() encoded error code.
 */
struct devlink_linecard *
devl_linecard_create(struct devlink *devlink, unsigned int linecard_index,
		     const struct devlink_linecard_ops *ops, void *priv)
{}
EXPORT_SYMBOL_GPL();

/**
 *	devl_linecard_destroy - Destroy devlink linecard
 *
 *	@linecard: devlink linecard
 */
void devl_linecard_destroy(struct devlink_linecard *linecard)
{}
EXPORT_SYMBOL_GPL();

/**
 *	devlink_linecard_provision_set - Set provisioning on linecard
 *
 *	@linecard: devlink linecard
 *	@type: linecard type
 *
 *	This is either called directly from the provision() op call or
 *	as a result of the provision() op call asynchronously.
 */
void devlink_linecard_provision_set(struct devlink_linecard *linecard,
				    const char *type)
{}
EXPORT_SYMBOL_GPL();

/**
 *	devlink_linecard_provision_clear - Clear provisioning on linecard
 *
 *	@linecard: devlink linecard
 *
 *	This is either called directly from the unprovision() op call or
 *	as a result of the unprovision() op call asynchronously.
 */
void devlink_linecard_provision_clear(struct devlink_linecard *linecard)
{}
EXPORT_SYMBOL_GPL();

/**
 *	devlink_linecard_provision_fail - Fail provisioning on linecard
 *
 *	@linecard: devlink linecard
 *
 *	This is either called directly from the provision() op call or
 *	as a result of the provision() op call asynchronously.
 */
void devlink_linecard_provision_fail(struct devlink_linecard *linecard)
{}
EXPORT_SYMBOL_GPL();

/**
 *	devlink_linecard_activate - Set linecard active
 *
 *	@linecard: devlink linecard
 */
void devlink_linecard_activate(struct devlink_linecard *linecard)
{}
EXPORT_SYMBOL_GPL();

/**
 *	devlink_linecard_deactivate - Set linecard inactive
 *
 *	@linecard: devlink linecard
 */
void devlink_linecard_deactivate(struct devlink_linecard *linecard)
{}
EXPORT_SYMBOL_GPL();

static void devlink_linecard_rel_notify_cb(struct devlink *devlink,
					   u32 linecard_index)
{}

static void devlink_linecard_rel_cleanup_cb(struct devlink *devlink,
					    u32 linecard_index, u32 rel_index)
{}

/**
 *	devlink_linecard_nested_dl_set - Attach/detach nested devlink
 *					 instance to linecard.
 *
 *	@linecard: devlink linecard
 *	@nested_devlink: devlink instance to attach or NULL to detach
 */
int devlink_linecard_nested_dl_set(struct devlink_linecard *linecard,
				   struct devlink *nested_devlink)
{}
EXPORT_SYMBOL_GPL();