Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
mcg.c File Reference
#include <rdma/ib_mad.h>
#include <rdma/ib_smi.h>
#include <rdma/ib_cache.h>
#include <rdma/ib_sa.h>
#include <linux/mlx4/cmd.h>
#include <linux/rbtree.h>
#include <linux/delay.h>
#include "mlx4_ib.h"

Go to the source code of this file.

Data Structures

struct  mcast_member
 
struct  ib_sa_mcmember_data
 
struct  mcast_group
 
struct  mcast_req
 
struct  clean_work
 

Macros

#define MAX_VFS   80
 
#define MAX_PEND_REQS_PER_FUNC   4
 
#define MAD_TIMEOUT_MS   2000
 
#define mcg_warn(fmt, arg...)   pr_warn("MCG WARNING: " fmt, ##arg)
 
#define mcg_error(fmt, arg...)   pr_err(fmt, ##arg)
 
#define mcg_warn_group(group, format, arg...)
 
#define mcg_error_group(group, format, arg...)   pr_err(" %16s: " format, (group)->name, ## arg)
 
#define safe_atomic_dec(ref)
 
#define MAD_STATUS_REQ_INVALID   0x0200
 

Enumerations

enum  mcast_state {
  MCAST_JOINING, MCAST_MEMBER, MCAST_ERROR, MCAST_NOT_MEMBER = 0,
  MCAST_MEMBER
}
 
enum  mcast_group_state {
  MCAST_IDLE, MCAST_BUSY, MCAST_GROUP_ERROR, MCAST_PKEY_EVENT,
  MCAST_IDLE, MCAST_JOIN_SENT, MCAST_LEAVE_SENT, MCAST_RESP_READY
}
 

Functions

int mlx4_ib_mcg_demux_handler (struct ib_device *ibdev, int port, int slave, struct ib_sa_mad *mad)
 
int mlx4_ib_mcg_multiplex_handler (struct ib_device *ibdev, int port, int slave, struct ib_sa_mad *sa_mad)
 
int mlx4_ib_mcg_port_init (struct mlx4_ib_demux_ctx *ctx)
 
void mlx4_ib_mcg_port_cleanup (struct mlx4_ib_demux_ctx *ctx, int destroy_wq)
 
void clean_vf_mcast (struct mlx4_ib_demux_ctx *ctx, int slave)
 
int mlx4_ib_mcg_init (void)
 
void mlx4_ib_mcg_destroy (void)
 

Macro Definition Documentation

#define MAD_STATUS_REQ_INVALID   0x0200
#define MAD_TIMEOUT_MS   2000

Definition at line 46 of file mcg.c.

#define MAX_PEND_REQS_PER_FUNC   4

Definition at line 45 of file mcg.c.

#define MAX_VFS   80

Definition at line 44 of file mcg.c.

#define mcg_error (   fmt,
  arg... 
)    pr_err(fmt, ##arg)

Definition at line 49 of file mcg.c.

#define mcg_error_group (   group,
  format,
  arg... 
)    pr_err(" %16s: " format, (group)->name, ## arg)

Definition at line 54 of file mcg.c.

#define mcg_warn (   fmt,
  arg... 
)    pr_warn("MCG WARNING: " fmt, ##arg)

Definition at line 48 of file mcg.c.

#define mcg_warn_group (   group,
  format,
  arg... 
)
Value:
pr_warn("%s-%d: %16s (port %d): WARNING: " format, __func__, __LINE__,\
(group)->name, group->demux->port, ## arg)

Definition at line 50 of file mcg.c.

#define safe_atomic_dec (   ref)
Value:
do {\
if (atomic_dec_and_test(ref)) \
mcg_warn_group(group, "did not expect to reach zero\n"); \
} while (0)

Definition at line 137 of file mcg.c.

Enumeration Type Documentation

Enumerator:
MCAST_IDLE 
MCAST_BUSY 
MCAST_GROUP_ERROR 
MCAST_PKEY_EVENT 
MCAST_IDLE 
MCAST_JOIN_SENT 
MCAST_LEAVE_SENT 
MCAST_RESP_READY 

Definition at line 67 of file mcg.c.

Enumerator:
MCAST_JOINING 
MCAST_MEMBER 
MCAST_ERROR 
MCAST_NOT_MEMBER 
MCAST_MEMBER 

Definition at line 62 of file mcg.c.

Function Documentation

void clean_vf_mcast ( struct mlx4_ib_demux_ctx ctx,
int  slave 
)

Definition at line 1224 of file mcg.c.

int mlx4_ib_mcg_demux_handler ( struct ib_device ibdev,
int  port,
int  slave,
struct ib_sa_mad mad 
)

Definition at line 880 of file mcg.c.

void mlx4_ib_mcg_destroy ( void  )

Definition at line 1253 of file mcg.c.

int mlx4_ib_mcg_init ( void  )

Definition at line 1244 of file mcg.c.

int mlx4_ib_mcg_multiplex_handler ( struct ib_device ibdev,
int  port,
int  slave,
struct ib_sa_mad sa_mad 
)

Definition at line 929 of file mcg.c.

void mlx4_ib_mcg_port_cleanup ( struct mlx4_ib_demux_ctx ctx,
int  destroy_wq 
)

Definition at line 1124 of file mcg.c.

int mlx4_ib_mcg_port_init ( struct mlx4_ib_demux_ctx ctx)

Definition at line 1039 of file mcg.c.