#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)
{ … }
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)
{ … }
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)
{ … }