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

Go to the source code of this file.

Data Structures

struct  mlx4_mad_rcv_buf
 
struct  mlx4_mad_snd_buf
 
struct  mlx4_tunnel_mad
 
struct  mlx4_rcv_tunnel_mad
 

Macros

#define MLX4_TUN_SEND_WRID_SHIFT   34
 
#define MLX4_TUN_QPN_SHIFT   32
 
#define MLX4_TUN_WRID_RECV   (((u64) 1) << MLX4_TUN_SEND_WRID_SHIFT)
 
#define MLX4_TUN_SET_WRID_QPN(a)   (((u64) ((a) & 0x3)) << MLX4_TUN_QPN_SHIFT)
 
#define MLX4_TUN_IS_RECV(a)   (((a) >> MLX4_TUN_SEND_WRID_SHIFT) & 0x1)
 
#define MLX4_TUN_WRID_QPN(a)   (((a) >> MLX4_TUN_QPN_SHIFT) & 0x3)
 
#define GET_BLK_PTR_FROM_EQE(eqe)   be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.block_ptr)
 
#define GET_MASK_FROM_EQE(eqe)   be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.tbl_entries_mask)
 
#define NUM_IDX_IN_PKEY_TBL_BLK   32
 
#define GUID_TBL_ENTRY_SIZE   8 /* size in bytes */
 
#define GUID_TBL_BLK_NUM_ENTRIES   8
 
#define GUID_TBL_BLK_SIZE   (GUID_TBL_ENTRY_SIZE * GUID_TBL_BLK_NUM_ENTRIES)
 
#define NODE_GUID_HI   ((u64) (((u64)IB_OPENIB_OUI) << 40))
 

Enumerations

enum  { MLX4_IB_VENDOR_CLASS1 = 0x9, MLX4_IB_VENDOR_CLASS2 = 0xa }
 

Functions

__be64 mlx4_ib_gen_node_guid (void)
 
__be64 mlx4_ib_get_new_demux_tid (struct mlx4_ib_demux_ctx *ctx)
 
int mlx4_MAD_IFC (struct mlx4_ib_dev *dev, int mad_ifc_flags, int port, struct ib_wc *in_wc, struct ib_grh *in_grh, void *in_mad, void *response_mad)
 
int mlx4_ib_find_real_gid (struct ib_device *ibdev, u8 port, __be64 guid)
 
int mlx4_ib_send_to_slave (struct mlx4_ib_dev *dev, int slave, u8 port, enum ib_qp_type dest_qpt, struct ib_wc *wc, struct ib_grh *grh, struct ib_mad *mad)
 
int mlx4_ib_process_mad (struct ib_device *ibdev, int mad_flags, u8 port_num, struct ib_wc *in_wc, struct ib_grh *in_grh, struct ib_mad *in_mad, struct ib_mad *out_mad)
 
int mlx4_ib_mad_init (struct mlx4_ib_dev *dev)
 
void mlx4_ib_mad_cleanup (struct mlx4_ib_dev *dev)
 
void handle_port_mgmt_change_event (struct work_struct *work)
 
void mlx4_ib_dispatch_event (struct mlx4_ib_dev *dev, u8 port_num, enum ib_event_type type)
 
int mlx4_ib_send_to_wire (struct mlx4_ib_dev *dev, int slave, u8 port, enum ib_qp_type dest_qpt, u16 pkey_index, u32 remote_qpn, u32 qkey, struct ib_ah_attr *attr, struct ib_mad *mad)
 
void mlx4_ib_tunnels_update_work (struct work_struct *work)
 
int mlx4_ib_init_sriov (struct mlx4_ib_dev *dev)
 
void mlx4_ib_close_sriov (struct mlx4_ib_dev *dev)
 

Variables

struct mlx4_mad_rcv_buf __packed
 

Macro Definition Documentation

#define GET_BLK_PTR_FROM_EQE (   eqe)    be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.block_ptr)

Definition at line 60 of file mad.c.

#define GET_MASK_FROM_EQE (   eqe)    be32_to_cpu(eqe->event.port_mgmt_change.params.tbl_change_info.tbl_entries_mask)

Definition at line 61 of file mad.c.

#define GUID_TBL_BLK_NUM_ENTRIES   8

Definition at line 64 of file mad.c.

#define GUID_TBL_BLK_SIZE   (GUID_TBL_ENTRY_SIZE * GUID_TBL_BLK_NUM_ENTRIES)

Definition at line 65 of file mad.c.

#define GUID_TBL_ENTRY_SIZE   8 /* size in bytes */

Definition at line 63 of file mad.c.

#define MLX4_TUN_IS_RECV (   a)    (((a) >> MLX4_TUN_SEND_WRID_SHIFT) & 0x1)

Definition at line 55 of file mad.c.

#define MLX4_TUN_QPN_SHIFT   32

Definition at line 51 of file mad.c.

#define MLX4_TUN_SEND_WRID_SHIFT   34

Definition at line 50 of file mad.c.

#define MLX4_TUN_SET_WRID_QPN (   a)    (((u64) ((a) & 0x3)) << MLX4_TUN_QPN_SHIFT)

Definition at line 53 of file mad.c.

#define MLX4_TUN_WRID_QPN (   a)    (((a) >> MLX4_TUN_QPN_SHIFT) & 0x3)

Definition at line 56 of file mad.c.

#define MLX4_TUN_WRID_RECV   (((u64) 1) << MLX4_TUN_SEND_WRID_SHIFT)

Definition at line 52 of file mad.c.

#define NODE_GUID_HI   ((u64) (((u64)IB_OPENIB_OUI) << 40))
#define NUM_IDX_IN_PKEY_TBL_BLK   32

Definition at line 62 of file mad.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
MLX4_IB_VENDOR_CLASS1 
MLX4_IB_VENDOR_CLASS2 

Definition at line 45 of file mad.c.

Function Documentation

void handle_port_mgmt_change_event ( struct work_struct work)

Definition at line 943 of file mad.c.

void mlx4_ib_close_sriov ( struct mlx4_ib_dev dev)

Definition at line 2024 of file mad.c.

void mlx4_ib_dispatch_event ( struct mlx4_ib_dev dev,
u8  port_num,
enum ib_event_type  type 
)

Definition at line 1006 of file mad.c.

int mlx4_ib_find_real_gid ( struct ib_device ibdev,
u8  port,
__be64  guid 
)

Definition at line 399 of file mad.c.

__be64 mlx4_ib_gen_node_guid ( void  )

Definition at line 93 of file mad.c.

__be64 mlx4_ib_get_new_demux_tid ( struct mlx4_ib_demux_ctx ctx)

Definition at line 99 of file mad.c.

int mlx4_ib_init_sriov ( struct mlx4_ib_dev dev)

Definition at line 1951 of file mad.c.

void mlx4_ib_mad_cleanup ( struct mlx4_ib_dev dev)

Definition at line 840 of file mad.c.

int mlx4_ib_mad_init ( struct mlx4_ib_dev dev)

Definition at line 804 of file mad.c.

int mlx4_ib_process_mad ( struct ib_device ibdev,
int  mad_flags,
u8  port_num,
struct ib_wc in_wc,
struct ib_grh in_grh,
struct ib_mad in_mad,
struct ib_mad out_mad 
)

Definition at line 780 of file mad.c.

int mlx4_ib_send_to_slave ( struct mlx4_ib_dev dev,
int  slave,
u8  port,
enum ib_qp_type  dest_qpt,
struct ib_wc wc,
struct ib_grh grh,
struct ib_mad mad 
)

Definition at line 453 of file mad.c.

int mlx4_ib_send_to_wire ( struct mlx4_ib_dev dev,
int  slave,
u8  port,
enum ib_qp_type  dest_qpt,
u16  pkey_index,
u32  remote_qpn,
u32  qkey,
struct ib_ah_attr attr,
struct ib_mad mad 
)

Definition at line 1078 of file mad.c.

void mlx4_ib_tunnels_update_work ( struct work_struct work)

Definition at line 1819 of file mad.c.

int mlx4_MAD_IFC ( struct mlx4_ib_dev dev,
int  mad_ifc_flags,
int  port,
struct ib_wc in_wc,
struct ib_grh in_grh,
void in_mad,
void response_mad 
)

Definition at line 105 of file mad.c.

Variable Documentation