linux/drivers/infiniband/hw/mlx4/cm.c

/*
 * Copyright (c) 2012 Mellanox Technologies. 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 <rdma/ib_mad.h>

#include <linux/mlx4/cmd.h>
#include <linux/rbtree.h>
#include <linux/idr.h>
#include <rdma/ib_cm.h>

#include "mlx4_ib.h"

#define CM_CLEANUP_CACHE_TIMEOUT

struct id_map_entry {};

struct rej_tmout_entry {};

struct cm_generic_msg {};

struct cm_sidr_generic_msg {};

struct cm_req_msg {};

static struct workqueue_struct *cm_wq;

static void set_local_comm_id(struct ib_mad *mad, u32 cm_id)
{}

static u32 get_local_comm_id(struct ib_mad *mad)
{}

static void set_remote_comm_id(struct ib_mad *mad, u32 cm_id)
{}

static u32 get_remote_comm_id(struct ib_mad *mad)
{}

static union ib_gid gid_from_req_msg(struct ib_device *ibdev, struct ib_mad *mad)
{}

/* Lock should be taken before called */
static struct id_map_entry *
id_map_find_by_sl_id(struct ib_device *ibdev, u32 slave_id, u32 sl_cm_id)
{}

static void id_map_ent_timeout(struct work_struct *work)
{}

static void sl_id_map_add(struct ib_device *ibdev, struct id_map_entry *new)
{}

static struct id_map_entry *
id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
{}

static struct id_map_entry *
id_map_get(struct ib_device *ibdev, int *pv_cm_id, int slave_id, int sl_cm_id)
{}

static void schedule_delayed(struct ib_device *ibdev, struct id_map_entry *id)
{}

#define REJ_REASON(m)
int mlx4_ib_multiplex_cm_handler(struct ib_device *ibdev, int port, int slave_id,
		struct ib_mad *mad)
{}

static void rej_tmout_timeout(struct work_struct *work)
{}

static int alloc_rej_tmout(struct mlx4_ib_sriov *sriov, u32 rem_pv_cm_id, int slave)
{}

static int lookup_rej_tmout_slave(struct mlx4_ib_sriov *sriov, u32 rem_pv_cm_id)
{}

int mlx4_ib_demux_cm_handler(struct ib_device *ibdev, int port, int *slave,
			     struct ib_mad *mad)
{}

void mlx4_ib_cm_paravirt_init(struct mlx4_ib_dev *dev)
{}

static void rej_tmout_xa_cleanup(struct mlx4_ib_sriov *sriov, int slave)
{}

/* slave = -1 ==> all slaves */
/* TBD -- call paravirt clean for single slave.  Need for slave RESET event */
void mlx4_ib_cm_paravirt_clean(struct mlx4_ib_dev *dev, int slave)
{}

int mlx4_ib_cm_init(void)
{}

void mlx4_ib_cm_destroy(void)
{}