Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ipath_qp.c File Reference
#include <linux/err.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include "ipath_verbs.h"
#include "ipath_kernel.h"

Go to the source code of this file.

Macros

#define BITS_PER_PAGE   (PAGE_SIZE*BITS_PER_BYTE)
 
#define BITS_PER_PAGE_MASK   (BITS_PER_PAGE-1)
 
#define mk_qpn(qpt, map, off)
 
#define find_next_offset(map, off)
 

Functions

unsigned ipath_free_all_qps (struct ipath_qp_table *qpt)
 
struct ipath_qpipath_lookup_qpn (struct ipath_qp_table *qpt, u32 qpn)
 
int ipath_error_qp (struct ipath_qp *qp, enum ib_wc_status err)
 
int ipath_modify_qp (struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, struct ib_udata *udata)
 
int ipath_query_qp (struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, struct ib_qp_init_attr *init_attr)
 
__be32 ipath_compute_aeth (struct ipath_qp *qp)
 
struct ib_qpipath_create_qp (struct ib_pd *ibpd, struct ib_qp_init_attr *init_attr, struct ib_udata *udata)
 
int ipath_destroy_qp (struct ib_qp *ibqp)
 
int ipath_init_qp_table (struct ipath_ibdev *idev, int size)
 
void ipath_get_credit (struct ipath_qp *qp, u32 aeth)
 

Macro Definition Documentation

#define BITS_PER_PAGE   (PAGE_SIZE*BITS_PER_BYTE)

Definition at line 42 of file ipath_qp.c.

#define BITS_PER_PAGE_MASK   (BITS_PER_PAGE-1)

Definition at line 43 of file ipath_qp.c.

#define find_next_offset (   map,
  off 
)
Value:

Definition at line 46 of file ipath_qp.c.

#define mk_qpn (   qpt,
  map,
  off 
)
Value:
(((map) - (qpt)->map) * BITS_PER_PAGE + \
(off))

Definition at line 44 of file ipath_qp.c.

Function Documentation

__be32 ipath_compute_aeth ( struct ipath_qp qp)

ipath_compute_aeth - compute the AETH (syndrome + MSN) : the queue pair to compute the AETH for

Returns the AETH.

Definition at line 677 of file ipath_qp.c.

struct ib_qp* ipath_create_qp ( struct ib_pd ibpd,
struct ib_qp_init_attr init_attr,
struct ib_udata udata 
)
read

ipath_create_qp - create a queue pair for a device : the protection domain who's device we create the queue pair for : the attributes of the queue pair : unused by InfiniPath

Returns the queue pair on success, otherwise returns an errno.

Called by the ib_create_qp() core verbs function.

Definition at line 741 of file ipath_qp.c.

int ipath_destroy_qp ( struct ib_qp ibqp)

ipath_destroy_qp - destroy a queue pair : the queue pair to destroy

Returns 0 on success.

Note that this can be called while the QP is actively sending or receiving!

Definition at line 962 of file ipath_qp.c.

int ipath_error_qp ( struct ipath_qp qp,
enum ib_wc_status  err 
)

ipath_error_qp - put a QP into the error state : the QP to put into the error state : the receive completion error to signal if a RWQE is active

Flushes both send and receive work queues. Returns true if last WQE event should be generated. The QP s_lock should be held and interrupts disabled. If we are already in error state, just return.

Definition at line 377 of file ipath_qp.c.

unsigned ipath_free_all_qps ( struct ipath_qp_table qpt)

ipath_free_all_qps - check for QPs still in use : the QP table to empty

There should not be any QPs still in use. Free memory for table.

Definition at line 271 of file ipath_qp.c.

void ipath_get_credit ( struct ipath_qp qp,
u32  aeth 
)

ipath_get_credit - flush the send work queue of a QP : the qp who's send work queue to flush : the Acknowledge Extended Transport Header

The QP s_lock should be held.

Definition at line 1055 of file ipath_qp.c.

int ipath_init_qp_table ( struct ipath_ibdev idev,
int  size 
)

ipath_init_qp_table - initialize the QP table for a device : the device who's QP table we're initializing : the size of the QP table

Returns 0 on success, otherwise returns an errno.

Definition at line 1022 of file ipath_qp.c.

struct ipath_qp* ipath_lookup_qpn ( struct ipath_qp_table qpt,
u32  qpn 
)
read

ipath_lookup_qpn - return the QP with the given QPN : the QP table : the QP number to look up

The caller is responsible for decrementing the QP reference count when done.

Definition at line 301 of file ipath_qp.c.

int ipath_modify_qp ( struct ib_qp ibqp,
struct ib_qp_attr attr,
int  attr_mask,
struct ib_udata udata 
)

ipath_modify_qp - modify the attributes of a queue pair : the queue pair who's attributes we're modifying : the new attributes : the mask of attributes to modify : user data for ipathverbs.so

Returns 0 on success, otherwise returns an errno.

Definition at line 450 of file ipath_qp.c.

int ipath_query_qp ( struct ib_qp ibqp,
struct ib_qp_attr attr,
int  attr_mask,
struct ib_qp_init_attr init_attr 
)

Definition at line 621 of file ipath_qp.c.