Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
mthca_cq.c File Reference
#include <linux/gfp.h>
#include <linux/hardirq.h>
#include <linux/sched.h>
#include <asm/io.h>
#include <rdma/ib_pack.h>
#include "mthca_dev.h"
#include "mthca_cmd.h"
#include "mthca_memfree.h"

Go to the source code of this file.

Data Structures

struct  mthca_cq_context
 
struct  mthca_cqe
 
struct  mthca_err_cqe
 

Macros

#define MTHCA_CQ_STATUS_OK   ( 0 << 28)
 
#define MTHCA_CQ_STATUS_OVERFLOW   ( 9 << 28)
 
#define MTHCA_CQ_STATUS_WRITE_FAIL   (10 << 28)
 
#define MTHCA_CQ_FLAG_TR   ( 1 << 18)
 
#define MTHCA_CQ_FLAG_OI   ( 1 << 17)
 
#define MTHCA_CQ_STATE_DISARMED   ( 0 << 8)
 
#define MTHCA_CQ_STATE_ARMED   ( 1 << 8)
 
#define MTHCA_CQ_STATE_ARMED_SOL   ( 4 << 8)
 
#define MTHCA_EQ_STATE_FIRED   (10 << 8)
 
#define MTHCA_CQ_ENTRY_OWNER_SW   (0 << 7)
 
#define MTHCA_CQ_ENTRY_OWNER_HW   (1 << 7)
 
#define MTHCA_TAVOR_CQ_DB_INC_CI   (1 << 24)
 
#define MTHCA_TAVOR_CQ_DB_REQ_NOT   (2 << 24)
 
#define MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL   (3 << 24)
 
#define MTHCA_TAVOR_CQ_DB_SET_CI   (4 << 24)
 
#define MTHCA_TAVOR_CQ_DB_REQ_NOT_MULT   (5 << 24)
 
#define MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL   (1 << 24)
 
#define MTHCA_ARBEL_CQ_DB_REQ_NOT   (2 << 24)
 
#define MTHCA_ARBEL_CQ_DB_REQ_NOT_MULT   (3 << 24)
 

Enumerations

enum  { MTHCA_MAX_DIRECT_CQ_SIZE = 4 * PAGE_SIZE }
 
enum  { MTHCA_CQ_ENTRY_SIZE = 0x20 }
 
enum  { MTHCA_ATOMIC_BYTE_LEN = 8 }
 
enum  { MTHCA_ERROR_CQE_OPCODE_MASK = 0xfe }
 
enum  {
  SYNDROME_LOCAL_LENGTH_ERR = 0x01, SYNDROME_LOCAL_QP_OP_ERR = 0x02, SYNDROME_LOCAL_EEC_OP_ERR = 0x03, SYNDROME_LOCAL_PROT_ERR = 0x04,
  SYNDROME_WR_FLUSH_ERR = 0x05, SYNDROME_MW_BIND_ERR = 0x06, SYNDROME_BAD_RESP_ERR = 0x10, SYNDROME_LOCAL_ACCESS_ERR = 0x11,
  SYNDROME_REMOTE_INVAL_REQ_ERR = 0x12, SYNDROME_REMOTE_ACCESS_ERR = 0x13, SYNDROME_REMOTE_OP_ERR = 0x14, SYNDROME_RETRY_EXC_ERR = 0x15,
  SYNDROME_RNR_RETRY_EXC_ERR = 0x16, SYNDROME_LOCAL_RDD_VIOL_ERR = 0x20, SYNDROME_REMOTE_INVAL_RD_REQ_ERR = 0x21, SYNDROME_REMOTE_ABORTED_ERR = 0x22,
  SYNDROME_INVAL_EECN_ERR = 0x23, SYNDROME_INVAL_EEC_STATE_ERR = 0x24
}
 

Functions

struct mthca_cq_context __attribute__ ((packed))
 
void mthca_cq_completion (struct mthca_dev *dev, u32 cqn)
 
void mthca_cq_event (struct mthca_dev *dev, u32 cqn, enum ib_event_type event_type)
 
void mthca_cq_clean (struct mthca_dev *dev, struct mthca_cq *cq, u32 qpn, struct mthca_srq *srq)
 
void mthca_cq_resize_copy_cqes (struct mthca_cq *cq)
 
int mthca_alloc_cq_buf (struct mthca_dev *dev, struct mthca_cq_buf *buf, int nent)
 
void mthca_free_cq_buf (struct mthca_dev *dev, struct mthca_cq_buf *buf, int cqe)
 
int mthca_poll_cq (struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
 
int mthca_tavor_arm_cq (struct ib_cq *cq, enum ib_cq_notify_flags flags)
 
int mthca_arbel_arm_cq (struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
 
int mthca_init_cq (struct mthca_dev *dev, int nent, struct mthca_ucontext *ctx, u32 pdn, struct mthca_cq *cq)
 
void mthca_free_cq (struct mthca_dev *dev, struct mthca_cq *cq)
 
int mthca_init_cq_table (struct mthca_dev *dev)
 
void mthca_cleanup_cq_table (struct mthca_dev *dev)
 

Variables

__be32 flags
 
__be64 start
 
__be32 logsize_usrpage
 
__be32 error_eqn
 
__be32 comp_eqn
 
__be32 pd
 
__be32 lkey
 
__be32 last_notified_index
 
__be32 solicit_producer_index
 
__be32 consumer_index
 
__be32 producer_index
 
__be32 cqn
 
__be32 ci_db
 
__be32 state_db
 
u32 reserved
 
enum { ... }  __attribute__
 

Macro Definition Documentation

#define MTHCA_ARBEL_CQ_DB_REQ_NOT   (2 << 24)

Definition at line 156 of file mthca_cq.c.

#define MTHCA_ARBEL_CQ_DB_REQ_NOT_MULT   (3 << 24)

Definition at line 157 of file mthca_cq.c.

#define MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL   (1 << 24)

Definition at line 155 of file mthca_cq.c.

#define MTHCA_CQ_ENTRY_OWNER_HW   (1 << 7)

Definition at line 147 of file mthca_cq.c.

#define MTHCA_CQ_ENTRY_OWNER_SW   (0 << 7)

Definition at line 146 of file mthca_cq.c.

#define MTHCA_CQ_FLAG_OI   ( 1 << 17)

Definition at line 86 of file mthca_cq.c.

#define MTHCA_CQ_FLAG_TR   ( 1 << 18)

Definition at line 85 of file mthca_cq.c.

#define MTHCA_CQ_STATE_ARMED   ( 1 << 8)

Definition at line 88 of file mthca_cq.c.

#define MTHCA_CQ_STATE_ARMED_SOL   ( 4 << 8)

Definition at line 89 of file mthca_cq.c.

#define MTHCA_CQ_STATE_DISARMED   ( 0 << 8)

Definition at line 87 of file mthca_cq.c.

#define MTHCA_CQ_STATUS_OK   ( 0 << 28)

Definition at line 82 of file mthca_cq.c.

#define MTHCA_CQ_STATUS_OVERFLOW   ( 9 << 28)

Definition at line 83 of file mthca_cq.c.

#define MTHCA_CQ_STATUS_WRITE_FAIL   (10 << 28)

Definition at line 84 of file mthca_cq.c.

#define MTHCA_EQ_STATE_FIRED   (10 << 8)

Definition at line 90 of file mthca_cq.c.

#define MTHCA_TAVOR_CQ_DB_INC_CI   (1 << 24)

Definition at line 149 of file mthca_cq.c.

#define MTHCA_TAVOR_CQ_DB_REQ_NOT   (2 << 24)

Definition at line 150 of file mthca_cq.c.

#define MTHCA_TAVOR_CQ_DB_REQ_NOT_MULT   (5 << 24)

Definition at line 153 of file mthca_cq.c.

#define MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL   (3 << 24)

Definition at line 151 of file mthca_cq.c.

#define MTHCA_TAVOR_CQ_DB_SET_CI   (4 << 24)

Definition at line 152 of file mthca_cq.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
MTHCA_MAX_DIRECT_CQ_SIZE 

Definition at line 49 of file mthca_cq.c.

anonymous enum
Enumerator:
MTHCA_CQ_ENTRY_SIZE 

Definition at line 53 of file mthca_cq.c.

anonymous enum
Enumerator:
MTHCA_ATOMIC_BYTE_LEN 

Definition at line 57 of file mthca_cq.c.

anonymous enum
Enumerator:
MTHCA_ERROR_CQE_OPCODE_MASK 

Definition at line 92 of file mthca_cq.c.

anonymous enum
Enumerator:
SYNDROME_LOCAL_LENGTH_ERR 
SYNDROME_LOCAL_QP_OP_ERR 
SYNDROME_LOCAL_EEC_OP_ERR 
SYNDROME_LOCAL_PROT_ERR 
SYNDROME_WR_FLUSH_ERR 
SYNDROME_MW_BIND_ERR 
SYNDROME_BAD_RESP_ERR 
SYNDROME_LOCAL_ACCESS_ERR 
SYNDROME_REMOTE_INVAL_REQ_ERR 
SYNDROME_REMOTE_ACCESS_ERR 
SYNDROME_REMOTE_OP_ERR 
SYNDROME_RETRY_EXC_ERR 
SYNDROME_RNR_RETRY_EXC_ERR 
SYNDROME_LOCAL_RDD_VIOL_ERR 
SYNDROME_REMOTE_INVAL_RD_REQ_ERR 
SYNDROME_REMOTE_ABORTED_ERR 
SYNDROME_INVAL_EECN_ERR 
SYNDROME_INVAL_EEC_STATE_ERR 

Definition at line 96 of file mthca_cq.c.

Function Documentation

struct mthca_cq_context __attribute__ ( (packed)  )
read

Definition at line 171 of file esd_usb2.c.

int mthca_alloc_cq_buf ( struct mthca_dev dev,
struct mthca_cq_buf buf,
int  nent 
)

Definition at line 353 of file mthca_cq.c.

int mthca_arbel_arm_cq ( struct ib_cq ibcq,
enum ib_cq_notify_flags  flags 
)

Definition at line 744 of file mthca_cq.c.

void mthca_cleanup_cq_table ( struct mthca_dev dev)

Definition at line 980 of file mthca_cq.c.

void mthca_cq_clean ( struct mthca_dev dev,
struct mthca_cq cq,
u32  qpn,
struct mthca_srq srq 
)

Definition at line 278 of file mthca_cq.c.

void mthca_cq_completion ( struct mthca_dev dev,
u32  cqn 
)

Definition at line 222 of file mthca_cq.c.

void mthca_cq_event ( struct mthca_dev dev,
u32  cqn,
enum ib_event_type  event_type 
)

Definition at line 238 of file mthca_cq.c.

void mthca_cq_resize_copy_cqes ( struct mthca_cq cq)

Definition at line 330 of file mthca_cq.c.

void mthca_free_cq ( struct mthca_dev dev,
struct mthca_cq cq 
)

Definition at line 906 of file mthca_cq.c.

void mthca_free_cq_buf ( struct mthca_dev dev,
struct mthca_cq_buf buf,
int  cqe 
)

Definition at line 371 of file mthca_cq.c.

int mthca_init_cq ( struct mthca_dev dev,
int  nent,
struct mthca_ucontext ctx,
u32  pdn,
struct mthca_cq cq 
)

Definition at line 776 of file mthca_cq.c.

int mthca_init_cq_table ( struct mthca_dev dev)

Definition at line 959 of file mthca_cq.c.

int mthca_poll_cq ( struct ib_cq ibcq,
int  num_entries,
struct ib_wc entry 
)

Definition at line 662 of file mthca_cq.c.

int mthca_tavor_arm_cq ( struct ib_cq cq,
enum ib_cq_notify_flags  flags 
)

Definition at line 731 of file mthca_cq.c.

Variable Documentation

enum { ... } __attribute__
__be32 ci_db

Definition at line 93 of file mthca_cq.c.

__be32 comp_eqn

Definition at line 85 of file mthca_cq.c.

__be32 consumer_index

Definition at line 90 of file mthca_cq.c.

__be32 cqn

Definition at line 92 of file mthca_cq.c.

__be32 error_eqn

Definition at line 84 of file mthca_cq.c.

__be32 flags

Definition at line 81 of file mthca_cq.c.

__be32 last_notified_index

Definition at line 88 of file mthca_cq.c.

__be32 lkey

Definition at line 87 of file mthca_cq.c.

__be32 logsize_usrpage

Definition at line 83 of file mthca_cq.c.

__be32 pd

Definition at line 86 of file mthca_cq.c.

__be32 producer_index

Definition at line 91 of file mthca_cq.c.

u32 reserved

Definition at line 95 of file mthca_cq.c.

__be32 solicit_producer_index

Definition at line 89 of file mthca_cq.c.

__be64 start

Definition at line 82 of file mthca_cq.c.

__be32 state_db

Definition at line 94 of file mthca_cq.c.