Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
ipath_verbs.c File Reference
#include <rdma/ib_mad.h>
#include <rdma/ib_user_verbs.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/utsname.h>
#include <linux/rculist.h>
#include "ipath_kernel.h"
#include "ipath_verbs.h"
#include "ipath_common.h"

Go to the source code of this file.

Data Structures

struct  ipath_ucontext
 

Functions

 module_param_named (qp_table_size, ib_ipath_qp_table_size, uint, S_IRUGO)
 
 MODULE_PARM_DESC (qp_table_size,"QP table size")
 
 module_param_named (lkey_table_size, ib_ipath_lkey_table_size, uint, S_IRUGO)
 
 MODULE_PARM_DESC (lkey_table_size,"LKEY table size in bits (2^n, 1 <= n <= 23)")
 
 module_param_named (max_pds, ib_ipath_max_pds, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_pds,"Maximum number of protection domains to support")
 
 module_param_named (max_ahs, ib_ipath_max_ahs, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_ahs,"Maximum number of address handles to support")
 
 module_param_named (max_cqes, ib_ipath_max_cqes, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_cqes,"Maximum number of completion queue entries to support")
 
 module_param_named (max_cqs, ib_ipath_max_cqs, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_cqs,"Maximum number of completion queues to support")
 
 module_param_named (max_qp_wrs, ib_ipath_max_qp_wrs, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_qp_wrs,"Maximum number of QP WRs to support")
 
 module_param_named (max_qps, ib_ipath_max_qps, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_qps,"Maximum number of QPs to support")
 
 module_param_named (max_sges, ib_ipath_max_sges, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_sges,"Maximum number of SGEs to support")
 
 module_param_named (max_mcast_grps, ib_ipath_max_mcast_grps, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_mcast_grps,"Maximum number of multicast groups to support")
 
 module_param_named (max_mcast_qp_attached, ib_ipath_max_mcast_qp_attached, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_mcast_qp_attached,"Maximum number of attached QPs to support")
 
 module_param_named (max_srqs, ib_ipath_max_srqs, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_srqs,"Maximum number of SRQs to support")
 
 module_param_named (max_srq_sges, ib_ipath_max_srq_sges, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_srq_sges,"Maximum number of SRQ SGEs to support")
 
 module_param_named (max_srq_wrs, ib_ipath_max_srq_wrs, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (max_srq_wrs,"Maximum number of SRQ WRs support")
 
 module_param_named (disable_sma, ib_ipath_disable_sma, uint, S_IWUSR|S_IRUGO)
 
 MODULE_PARM_DESC (disable_sma,"Disable the SMA")
 
void ipath_copy_sge (struct ipath_sge_state *ss, void *data, u32 length)
 
void ipath_skip_sge (struct ipath_sge_state *ss, u32 length)
 
void ipath_ib_rcv (struct ipath_ibdev *dev, void *rhdr, void *data, u32 tlen)
 
unsigned ipath_ib_rate_to_mult (enum ib_rate rate)
 
int ipath_verbs_send (struct ipath_qp *qp, struct ipath_ib_header *hdr, u32 hdrwords, struct ipath_sge_state *ss, u32 len)
 
int ipath_snapshot_counters (struct ipath_devdata *dd, u64 *swords, u64 *rwords, u64 *spkts, u64 *rpkts, u64 *xmit_wait)
 
int ipath_get_counters (struct ipath_devdata *dd, struct ipath_verbs_counters *cntrs)
 
int ipath_ib_piobufavail (struct ipath_ibdev *dev)
 
u32 ipath_get_cr_errpkey (struct ipath_devdata *dd)
 
unsigned ipath_get_npkeys (struct ipath_devdata *dd)
 
unsigned ipath_get_pkey (struct ipath_devdata *dd, unsigned index)
 
int ipath_register_ib_device (struct ipath_devdata *dd)
 
void ipath_unregister_ib_device (struct ipath_ibdev *dev)
 

Variables

unsigned int ib_ipath_lkey_table_size = 12
 
unsigned int ib_ipath_max_cqes = 0x2FFFF
 
unsigned int ib_ipath_max_cqs = 0x1FFFF
 
unsigned int ib_ipath_max_qp_wrs = 0x3FFF
 
unsigned int ib_ipath_max_qps = 16384
 
unsigned int ib_ipath_max_sges = 0x60
 
unsigned int ib_ipath_max_mcast_grps = 16384
 
unsigned int ib_ipath_max_mcast_qp_attached = 16
 
unsigned int ib_ipath_max_srqs = 1024
 
unsigned int ib_ipath_max_srq_sges = 128
 
unsigned int ib_ipath_max_srq_wrs = 0x1FFFF
 
const int ib_ipath_state_ops [IB_QPS_ERR+1]
 
enum ib_wc_opcode ib_ipath_wc_opcode []
 
const u8 ipath_cvt_physportstate [32]
 

Function Documentation

void ipath_copy_sge ( struct ipath_sge_state ss,
void data,
u32  length 
)

ipath_copy_sge - copy data to SGE memory : the SGE state : the data to copy : the length of the data

Definition at line 171 of file ipath_verbs.c.

int ipath_get_counters ( struct ipath_devdata dd,
struct ipath_verbs_counters cntrs 
)

ipath_get_counters - get various chip counters : the infinipath device : counters are placed here

Return the counters needed by recv_pma_get_portcounters().

Definition at line 1382 of file ipath_verbs.c.

u32 ipath_get_cr_errpkey ( struct ipath_devdata dd)

Definition at line 1575 of file ipath_verbs.c.

unsigned ipath_get_npkeys ( struct ipath_devdata dd)

ipath_get_npkeys - return the size of the PKEY table for port 0 : the infinipath device

Definition at line 1851 of file ipath_verbs.c.

unsigned ipath_get_pkey ( struct ipath_devdata dd,
unsigned  index 
)

ipath_get_pkey - return the indexed PKEY from the port PKEY table : the infinipath device : the PKEY index

Definition at line 1861 of file ipath_verbs.c.

int ipath_ib_piobufavail ( struct ipath_ibdev dev)

ipath_ib_piobufavail - callback when a PIO buffer is available

This is called from ipath_intr() at interrupt level when a PIO buffer is available after ipath_verbs_send() returned an error that no buffers were available. Return 1 if we consumed all the PIO buffers and we still have QPs waiting for buffers (for now, just restart the send tasklet and return zero).

Definition at line 1457 of file ipath_verbs.c.

unsigned ipath_ib_rate_to_mult ( enum ib_rate  rate)

Definition at line 977 of file ipath_verbs.c.

void ipath_ib_rcv ( struct ipath_ibdev dev,
void rhdr,
void data,
u32  tlen 
)

ipath_ib_rcv - process an incoming packet

This is called from ipath_kreceive() to process an incoming packet at interrupt level. Tlen is the length of the header + data + CRC in bytes.

Definition at line 583 of file ipath_verbs.c.

int ipath_register_ib_device ( struct ipath_devdata dd)

ipath_register_ib_device - register our device with the infiniband core : the device data structure Return the allocated ipath_ibdev pointer or NULL on error.

Definition at line 1988 of file ipath_verbs.c.

void ipath_skip_sge ( struct ipath_sge_state ss,
u32  length 
)

ipath_skip_sge - skip over SGE memory - XXX almost dup of prev func : the SGE state : the number of bytes to skip

Definition at line 211 of file ipath_verbs.c.

int ipath_snapshot_counters ( struct ipath_devdata dd,
u64 swords,
u64 rwords,
u64 spkts,
u64 rpkts,
u64 xmit_wait 
)

Definition at line 1352 of file ipath_verbs.c.

void ipath_unregister_ib_device ( struct ipath_ibdev dev)

Definition at line 2215 of file ipath_verbs.c.

int ipath_verbs_send ( struct ipath_qp qp,
struct ipath_ib_header hdr,
u32  hdrwords,
struct ipath_sge_state ss,
u32  len 
)

ipath_verbs_send - send a packet : the QP to send on : the packet header : the number of 32-bit words in the header : the SGE to send : the length of the packet in bytes

Definition at line 1322 of file ipath_verbs.c.

module_param_named ( qp_table_size  ,
ib_ipath_qp_table_size  ,
uint  ,
S_IRUGO   
)
module_param_named ( lkey_table_size  ,
ib_ipath_lkey_table_size  ,
uint  ,
S_IRUGO   
)
module_param_named ( max_pds  ,
ib_ipath_max_pds  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_ahs  ,
ib_ipath_max_ahs  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_cqes  ,
ib_ipath_max_cqes  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_cqs  ,
ib_ipath_max_cqs  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_qp_wrs  ,
ib_ipath_max_qp_wrs  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_qps  ,
ib_ipath_max_qps  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_sges  ,
ib_ipath_max_sges  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_mcast_grps  ,
ib_ipath_max_mcast_grps  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_mcast_qp_attached  ,
ib_ipath_max_mcast_qp_attached  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_srqs  ,
ib_ipath_max_srqs  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_srq_sges  ,
ib_ipath_max_srq_sges  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( max_srq_wrs  ,
ib_ipath_max_srq_wrs  ,
uint  ,
S_IWUSR S_IRUGO 
)
module_param_named ( disable_sma  ,
ib_ipath_disable_sma  ,
uint  ,
S_IWUSR S_IRUGO 
)
MODULE_PARM_DESC ( qp_table_size  ,
"QP table size  
)
MODULE_PARM_DESC ( lkey_table_size  ,
"LKEY table size in bits (2^n, 1 <= n <= 23)"   
)
MODULE_PARM_DESC ( max_pds  ,
"Maximum number of protection domains to support  
)
MODULE_PARM_DESC ( max_ahs  ,
"Maximum number of address handles to support  
)
MODULE_PARM_DESC ( max_cqes  ,
"Maximum number of completion queue entries to support  
)
MODULE_PARM_DESC ( max_cqs  ,
"Maximum number of completion queues to support  
)
MODULE_PARM_DESC ( max_qp_wrs  ,
"Maximum number of QP WRs to support  
)
MODULE_PARM_DESC ( max_qps  ,
"Maximum number of QPs to support  
)
MODULE_PARM_DESC ( max_sges  ,
"Maximum number of SGEs to support  
)
MODULE_PARM_DESC ( max_mcast_grps  ,
"Maximum number of multicast groups to support  
)
MODULE_PARM_DESC ( max_mcast_qp_attached  ,
"Maximum number of attached QPs to support  
)
MODULE_PARM_DESC ( max_srqs  ,
"Maximum number of SRQs to support  
)
MODULE_PARM_DESC ( max_srq_sges  ,
"Maximum number of SRQ SGEs to support  
)
MODULE_PARM_DESC ( max_srq_wrs  ,
"Maximum number of SRQ WRs support  
)
MODULE_PARM_DESC ( disable_sma  ,
"Disable the SMA  
)

Variable Documentation

unsigned int ib_ipath_lkey_table_size = 12

Definition at line 50 of file ipath_verbs.c.

unsigned int ib_ipath_max_cqes = 0x2FFFF

Definition at line 65 of file ipath_verbs.c.

unsigned int ib_ipath_max_cqs = 0x1FFFF

Definition at line 70 of file ipath_verbs.c.

unsigned int ib_ipath_max_mcast_grps = 16384

Definition at line 87 of file ipath_verbs.c.

unsigned int ib_ipath_max_mcast_qp_attached = 16

Definition at line 93 of file ipath_verbs.c.

unsigned int ib_ipath_max_qp_wrs = 0x3FFF

Definition at line 74 of file ipath_verbs.c.

unsigned int ib_ipath_max_qps = 16384

Definition at line 79 of file ipath_verbs.c.

unsigned int ib_ipath_max_sges = 0x60

Definition at line 83 of file ipath_verbs.c.

unsigned int ib_ipath_max_srq_sges = 128

Definition at line 103 of file ipath_verbs.c.

unsigned int ib_ipath_max_srq_wrs = 0x1FFFF

Definition at line 108 of file ipath_verbs.c.

unsigned int ib_ipath_max_srqs = 1024

Definition at line 99 of file ipath_verbs.c.

const int ib_ipath_state_ops[IB_QPS_ERR+1]
enum ib_wc_opcode ib_ipath_wc_opcode[]
const u8 ipath_cvt_physportstate[32]