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

Go to the source code of this file.


void ipath_insert_rnr_queue (struct ipath_qp *qp)
int ipath_init_sge (struct ipath_qp *qp, struct ipath_rwqe *wqe, u32 *lengthp, struct ipath_sge_state *ss)
int ipath_get_rwqe (struct ipath_qp *qp, int wr_id_only)
u32 ipath_make_grh (struct ipath_ibdev *dev, struct ib_grh *hdr, struct ib_global_route *grh, u32 hwords, u32 nwords)
void ipath_make_ruc_header (struct ipath_ibdev *dev, struct ipath_qp *qp, struct ipath_other_headers *ohdr, u32 bth0, u32 bth2)
void ipath_do_send (unsigned long data)
void ipath_send_complete (struct ipath_qp *qp, struct ipath_swqe *wqe, enum ib_wc_status status)


const u32 ib_ipath_rnr_table [32]

Function Documentation

void ipath_do_send ( unsigned long  data)

ipath_do_send - perform a send on a QP : contains a pointer to the QP

Process entries in the send work queue until credit or queue is exhausted. Only allow one CPU to send a packet per QP (tasklet). Otherwise, two threads could send packets out of order.

Definition at line 639 of file ipath_ruc.c.

int ipath_get_rwqe ( struct ipath_qp qp,
int  wr_id_only 

ipath_get_rwqe - copy the next RWQE into the QP's RWQE : the QP : update qp->r_wr_id only, not qp->r_sge

Return 0 if no RWQE is available, otherwise return 1.

Can be called from interrupt level.

Definition at line 166 of file ipath_ruc.c.

int ipath_init_sge ( struct ipath_qp qp,
struct ipath_rwqe wqe,
u32 lengthp,
struct ipath_sge_state ss 

ipath_init_sge - Validate a RWQE and fill in the SGE state : the QP

Return 1 if OK.

Definition at line 123 of file ipath_ruc.c.

void ipath_insert_rnr_queue ( struct ipath_qp qp)

ipath_insert_rnr_queue - put QP on the RNR timeout list for the device : the QP

Called with the QP s_lock held and interrupts disabled. XXX Use a simple list for now. We might need a priority queue if we have lots of QPs waiting for RNR timeouts but that should be rare.

Definition at line 87 of file ipath_ruc.c.

u32 ipath_make_grh ( struct ipath_ibdev dev,
struct ib_grh hdr,
struct ib_global_route grh,
u32  hwords,
u32  nwords 

ipath_make_grh - construct a GRH header : a pointer to the ipath device : a pointer to the GRH header being constructed : the global route address to send to : the number of 32 bit words of header being sent : the number of 32 bit words of data being sent

Return the size of the header in 32 bit words.

Definition at line 580 of file ipath_ruc.c.

void ipath_make_ruc_header ( struct ipath_ibdev dev,
struct ipath_qp qp,
struct ipath_other_headers ohdr,
u32  bth0,
u32  bth2 

Definition at line 600 of file ipath_ruc.c.

void ipath_send_complete ( struct ipath_qp qp,
struct ipath_swqe wqe,
enum ib_wc_status  status 

Definition at line 699 of file ipath_ruc.c.

Variable Documentation

const u32 ib_ipath_rnr_table[32]

Definition at line 43 of file ipath_ruc.c.