linux/drivers/target/tcm_fc/tfc_conf.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*******************************************************************************
 * Filename:  tcm_fc.c
 *
 * This file contains the configfs implementation for TCM_fc fabric node.
 * Based on tcm_loop_configfs.c
 *
 * Copyright (c) 2010 Cisco Systems, Inc.
 * Copyright (c) 2009,2010 Rising Tide, Inc.
 * Copyright (c) 2009,2010 Linux-iSCSI.org
 *
 * Copyright (c) 2009,2010 Nicholas A. Bellinger <[email protected]>
 *
 ****************************************************************************/

#include <linux/module.h>
#include <linux/moduleparam.h>
#include <generated/utsrelease.h>
#include <linux/utsname.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/kthread.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/configfs.h>
#include <linux/kernel.h>
#include <linux/ctype.h>
#include <linux/unaligned.h>
#include <scsi/libfc.h>

#include <target/target_core_base.h>
#include <target/target_core_fabric.h>

#include "tcm_fc.h"

static LIST_HEAD(ft_wwn_list);
DEFINE_MUTEX();

unsigned int ft_debug_logging;
module_param_named(debug_logging, ft_debug_logging, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC();

/*
 * Parse WWN.
 * If strict, we require lower-case hex and colon separators to be sure
 * the name is the same as what would be generated by ft_format_wwn()
 * so the name and wwn are mapped one-to-one.
 */
static ssize_t ft_parse_wwn(const char *name, u64 *wwn, int strict)
{}

ssize_t ft_format_wwn(char *buf, size_t len, u64 wwn)
{}

static ssize_t ft_wwn_show(void *arg, char *buf)
{}

static ssize_t ft_wwn_store(void *arg, const char *buf, size_t len)
{}

/*
 * ACL auth ops.
 */

static ssize_t ft_nacl_port_name_show(struct config_item *item, char *page)
{}

static ssize_t ft_nacl_port_name_store(struct config_item *item,
		const char *page, size_t count)
{}

static ssize_t ft_nacl_node_name_show(struct config_item *item,
		char *page)
{}

static ssize_t ft_nacl_node_name_store(struct config_item *item,
		const char *page, size_t count)
{}

CONFIGFS_ATTR();
CONFIGFS_ATTR();

static ssize_t ft_nacl_tag_show(struct config_item *item,
		char *page)
{}

static ssize_t ft_nacl_tag_store(struct config_item *item,
		const char *page, size_t count)
{}

CONFIGFS_ATTR();

static struct configfs_attribute *ft_nacl_base_attrs[] =;

/*
 * ACL ops.
 */

/*
 * Add ACL for an initiator.  The ACL is named arbitrarily.
 * The port_name and/or node_name are attributes.
 */
static int ft_init_nodeacl(struct se_node_acl *nacl, const char *name)
{}

/*
 * local_port port_group (tpg) ops.
 */
static struct se_portal_group *ft_add_tpg(struct se_wwn *wwn, const char *name)
{}

static void ft_del_tpg(struct se_portal_group *se_tpg)
{}

/*
 * Verify that an lport is configured to use the tcm_fc module, and return
 * the target port group that should be used.
 *
 * The caller holds ft_lport_lock.
 */
struct ft_tpg *ft_lport_find_tpg(struct fc_lport *lport)
{}

/*
 * target config instance ops.
 */

/*
 * Add lport to allowed config.
 * The name is the WWPN in lower-case ASCII, colon-separated bytes.
 */
static struct se_wwn *ft_add_wwn(
	struct target_fabric_configfs *tf,
	struct config_group *group,
	const char *name)
{}

static void ft_del_wwn(struct se_wwn *wwn)
{}

static ssize_t ft_wwn_version_show(struct config_item *item, char *page)
{}

CONFIGFS_ATTR_RO();

static struct configfs_attribute *ft_wwn_attrs[] =;

static inline struct ft_tpg *ft_tpg(struct se_portal_group *se_tpg)
{}

static char *ft_get_fabric_wwn(struct se_portal_group *se_tpg)
{}

static u16 ft_get_tag(struct se_portal_group *se_tpg)
{}

static u32 ft_tpg_get_inst_index(struct se_portal_group *se_tpg)
{}

static const struct target_core_fabric_ops ft_fabric_ops =;

static struct notifier_block ft_notifier =;

static int __init ft_init(void)
{}

static void __exit ft_exit(void)
{}

MODULE_DESCRIPTION();
MODULE_LICENSE();
module_init();
module_exit(ft_exit);