linux/drivers/infiniband/core/cma_configfs.c

/*
 * Copyright (c) 2015, Mellanox Technologies inc.  All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 *     Redistribution and use in source and binary forms, with or
 *     without modification, are permitted provided that the following
 *     conditions are met:
 *
 *      - Redistributions of source code must retain the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer.
 *
 *      - Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer in the documentation and/or other materials
 *        provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#include <linux/configfs.h>
#include <rdma/ib_verbs.h>
#include <rdma/rdma_cm.h>

#include "core_priv.h"
#include "cma_priv.h"

struct cma_device;

struct cma_dev_group;

struct cma_dev_port_group {};

struct cma_dev_group {};

static struct cma_dev_port_group *to_dev_port_group(struct config_item *item)
{}

static bool filter_by_name(struct ib_device *ib_dev, void *cookie)
{}

static int cma_configfs_params_get(struct config_item *item,
				   struct cma_device **pcma_dev,
				   struct cma_dev_port_group **pgroup)
{}

static void cma_configfs_params_put(struct cma_device *cma_dev)
{}

static ssize_t default_roce_mode_show(struct config_item *item,
				      char *buf)
{}

static ssize_t default_roce_mode_store(struct config_item *item,
				       const char *buf, size_t count)
{}

CONFIGFS_ATTR();

static ssize_t default_roce_tos_show(struct config_item *item, char *buf)
{}

static ssize_t default_roce_tos_store(struct config_item *item,
				      const char *buf, size_t count)
{}

CONFIGFS_ATTR();

static struct configfs_attribute *cma_configfs_attributes[] =;

static const struct config_item_type cma_port_group_type =;

static int make_cma_ports(struct cma_dev_group *cma_dev_group,
			  struct cma_device *cma_dev)
{}

static void release_cma_dev(struct config_item  *item)
{
	struct config_group *group = container_of(item, struct config_group,
						  cg_item);
	struct cma_dev_group *cma_dev_group = container_of(group,
							   struct cma_dev_group,
							   device_group);

	kfree(cma_dev_group);
};

static void release_cma_ports_group(struct config_item  *item)
{
	struct config_group *group = container_of(item, struct config_group,
						  cg_item);
	struct cma_dev_group *cma_dev_group = container_of(group,
							   struct cma_dev_group,
							   ports_group);

	kfree(cma_dev_group->ports);
	cma_dev_group->ports = NULL;
};

static struct configfs_item_operations cma_ports_item_ops =;

static const struct config_item_type cma_ports_group_type =;

static struct configfs_item_operations cma_device_item_ops =;

static const struct config_item_type cma_device_group_type =;

static struct config_group *make_cma_dev(struct config_group *group,
					 const char *name)
{}

static void drop_cma_dev(struct config_group *cgroup, struct config_item *item)
{}

static struct configfs_group_operations cma_subsys_group_ops =;

static const struct config_item_type cma_subsys_type =;

static struct configfs_subsystem cma_subsys =;

int __init cma_configfs_init(void)
{}

void __exit cma_configfs_exit(void)
{}