Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
c2_qp.c File Reference
#include <linux/delay.h>
#include <linux/gfp.h>
#include "c2.h"
#include "c2_vq.h"
#include "c2_status.h"

Go to the source code of this file.

Macros

#define C2_MAX_ORD_PER_QP   128
 
#define C2_MAX_IRD_PER_QP   128
 
#define C2_HINT_MAKE(q_index, hint_count)   (((q_index) << 16) | hint_count)
 
#define C2_HINT_GET_INDEX(hint)   (((hint) & 0x7FFF0000) >> 16)
 
#define C2_HINT_GET_COUNT(hint)   ((hint) & 0x0000FFFF)
 
#define NO_SUPPORT   -1
 
#define C2_QP_NO_ATTR_CHANGE   0xFFFFFFFF
 

Functions

void c2_set_qp_state (struct c2_qp *qp, int c2_state)
 
int c2_qp_modify (struct c2_dev *c2dev, struct c2_qp *qp, struct ib_qp_attr *attr, int attr_mask)
 
int c2_qp_set_read_limits (struct c2_dev *c2dev, struct c2_qp *qp, int ord, int ird)
 
struct c2_qpc2_find_qpn (struct c2_dev *c2dev, int qpn)
 
int c2_alloc_qp (struct c2_dev *c2dev, struct c2_pd *pd, struct ib_qp_init_attr *qp_attrs, struct c2_qp *qp)
 
void c2_free_qp (struct c2_dev *c2dev, struct c2_qp *qp)
 
int c2_post_send (struct ib_qp *ibqp, struct ib_send_wr *ib_wr, struct ib_send_wr **bad_wr)
 
int c2_post_receive (struct ib_qp *ibqp, struct ib_recv_wr *ib_wr, struct ib_recv_wr **bad_wr)
 
void __devinit c2_init_qp_table (struct c2_dev *c2dev)
 
void __devexit c2_cleanup_qp_table (struct c2_dev *c2dev)
 

Macro Definition Documentation

#define C2_HINT_GET_COUNT (   hint)    ((hint) & 0x0000FFFF)

Definition at line 50 of file c2_qp.c.

#define C2_HINT_GET_INDEX (   hint)    (((hint) & 0x7FFF0000) >> 16)

Definition at line 49 of file c2_qp.c.

#define C2_HINT_MAKE (   q_index,
  hint_count 
)    (((q_index) << 16) | hint_count)

Definition at line 48 of file c2_qp.c.

#define C2_MAX_IRD_PER_QP   128

Definition at line 46 of file c2_qp.c.

#define C2_MAX_ORD_PER_QP   128

Definition at line 45 of file c2_qp.c.

#define C2_QP_NO_ATTR_CHANGE   0xFFFFFFFF

Definition at line 132 of file c2_qp.c.

#define NO_SUPPORT   -1

Definition at line 52 of file c2_qp.c.

Function Documentation

int c2_alloc_qp ( struct c2_dev c2dev,
struct c2_pd pd,
struct ib_qp_init_attr qp_attrs,
struct c2_qp qp 
)

Definition at line 413 of file c2_qp.c.

void __devexit c2_cleanup_qp_table ( struct c2_dev c2dev)

Definition at line 1019 of file c2_qp.c.

struct c2_qp* c2_find_qpn ( struct c2_dev c2dev,
int  qpn 
)
read

Definition at line 402 of file c2_qp.c.

void c2_free_qp ( struct c2_dev c2dev,
struct c2_qp qp 
)

Definition at line 598 of file c2_qp.c.

void __devinit c2_init_qp_table ( struct c2_dev c2dev)

Definition at line 1013 of file c2_qp.c.

int c2_post_receive ( struct ib_qp ibqp,
struct ib_recv_wr ib_wr,
struct ib_recv_wr **  bad_wr 
)

Definition at line 942 of file c2_qp.c.

int c2_post_send ( struct ib_qp ibqp,
struct ib_send_wr ib_wr,
struct ib_send_wr **  bad_wr 
)

Definition at line 788 of file c2_qp.c.

int c2_qp_modify ( struct c2_dev c2dev,
struct c2_qp qp,
struct ib_qp_attr attr,
int  attr_mask 
)

Definition at line 134 of file c2_qp.c.

int c2_qp_set_read_limits ( struct c2_dev c2dev,
struct c2_qp qp,
int  ord,
int  ird 
)

Definition at line 253 of file c2_qp.c.

void c2_set_qp_state ( struct c2_qp qp,
int  c2_state 
)

Definition at line 120 of file c2_qp.c.