Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
iw.h File Reference
#include <linux/interrupt.h>
#include <rdma/ib_verbs.h>
#include <rdma/rdma_cm.h>
#include "rds.h"
#include "rdma_transport.h"

Go to the source code of this file.

Data Structures

struct  rds_page_frag
 
struct  rds_iw_incoming
 
struct  rds_iw_connect_private
 
struct  rds_iw_scatterlist
 
struct  rds_iw_mapping
 
struct  rds_iw_send_work
 
struct  rds_iw_recv_work
 
struct  rds_iw_work_ring
 
struct  rds_iw_connection
 
struct  rds_iw_cm_id
 
struct  rds_iw_device
 
struct  rds_iw_statistics
 

Macros

#define RDS_FASTREG_SIZE   20
 
#define RDS_FASTREG_POOL_SIZE   2048
 
#define RDS_IW_MAX_SGE   8
 
#define RDS_IW_RECV_SGE   2
 
#define RDS_IW_DEFAULT_RECV_WR   1024
 
#define RDS_IW_DEFAULT_SEND_WR   256
 
#define RDS_IW_SUPPORTED_PROTOCOLS   0x00000003 /* minor versions supported */
 
#define RDS_PAGE_LAST_OFF   (((PAGE_SIZE / RDS_FRAG_SIZE) - 1) * RDS_FRAG_SIZE)
 
#define IB_GET_SEND_CREDITS(v)   ((v) & 0xffff)
 
#define IB_GET_POST_CREDITS(v)   ((v) >> 16)
 
#define IB_SET_SEND_CREDITS(v)   ((v) & 0xffff)
 
#define IB_SET_POST_CREDITS(v)   ((v) << 16)
 
#define IB_ACK_IN_FLIGHT   0
 
#define IB_ACK_REQUESTED   1
 
#define RDS_IW_ACK_WR_ID   ((u64)0xffffffffffffffffULL)
 
#define RDS_IW_FAST_REG_WR_ID   ((u64)0xefefefefefefefefULL)
 
#define RDS_IW_LOCAL_INV_WR_ID   ((u64)0xdfdfdfdfdfdfdfdfULL)
 
#define ib_dma_sync_sg_for_cpu   rds_iw_dma_sync_sg_for_cpu
 
#define ib_dma_sync_sg_for_device   rds_iw_dma_sync_sg_for_device
 
#define rds_iw_conn_error(conn, fmt...)   __rds_iw_conn_error(conn, KERN_WARNING "RDS/IW: " fmt)
 
#define rds_iw_stats_inc(member)   rds_stats_inc_which(rds_iw_stats, member)
 

Functions

int rds_iw_conn_alloc (struct rds_connection *conn, gfp_t gfp)
 
void rds_iw_conn_free (void *arg)
 
int rds_iw_conn_connect (struct rds_connection *conn)
 
void rds_iw_conn_shutdown (struct rds_connection *conn)
 
void rds_iw_state_change (struct sock *sk)
 
int rds_iw_listen_init (void)
 
void rds_iw_listen_stop (void)
 
void __rds_iw_conn_error (struct rds_connection *conn, const char *,...)
 
int rds_iw_cm_handle_connect (struct rdma_cm_id *cm_id, struct rdma_cm_event *event)
 
int rds_iw_cm_initiate_connect (struct rdma_cm_id *cm_id)
 
void rds_iw_cm_connect_complete (struct rds_connection *conn, struct rdma_cm_event *event)
 
int rds_iw_update_cm_id (struct rds_iw_device *rds_iwdev, struct rdma_cm_id *cm_id)
 
void rds_iw_add_conn (struct rds_iw_device *rds_iwdev, struct rds_connection *conn)
 
void rds_iw_remove_conn (struct rds_iw_device *rds_iwdev, struct rds_connection *conn)
 
void __rds_iw_destroy_conns (struct list_head *list, spinlock_t *list_lock)
 
struct rds_iw_mr_poolrds_iw_create_mr_pool (struct rds_iw_device *)
 
void rds_iw_get_mr_info (struct rds_iw_device *rds_iwdev, struct rds_info_rdma_connection *iinfo)
 
void rds_iw_destroy_mr_pool (struct rds_iw_mr_pool *)
 
voidrds_iw_get_mr (struct scatterlist *sg, unsigned long nents, struct rds_sock *rs, u32 *key_ret)
 
void rds_iw_sync_mr (void *trans_private, int dir)
 
void rds_iw_free_mr (void *trans_private, int invalidate)
 
void rds_iw_flush_mrs (void)
 
int rds_iw_recv_init (void)
 
void rds_iw_recv_exit (void)
 
int rds_iw_recv (struct rds_connection *conn)
 
int rds_iw_recv_refill (struct rds_connection *conn, gfp_t kptr_gfp, gfp_t page_gfp, int prefill)
 
void rds_iw_inc_free (struct rds_incoming *inc)
 
int rds_iw_inc_copy_to_user (struct rds_incoming *inc, struct iovec *iov, size_t size)
 
void rds_iw_recv_cq_comp_handler (struct ib_cq *cq, void *context)
 
void rds_iw_recv_tasklet_fn (unsigned long data)
 
void rds_iw_recv_init_ring (struct rds_iw_connection *ic)
 
void rds_iw_recv_clear_ring (struct rds_iw_connection *ic)
 
void rds_iw_recv_init_ack (struct rds_iw_connection *ic)
 
void rds_iw_attempt_ack (struct rds_iw_connection *ic)
 
void rds_iw_ack_send_complete (struct rds_iw_connection *ic)
 
u64 rds_iw_piggyb_ack (struct rds_iw_connection *ic)
 
void rds_iw_ring_init (struct rds_iw_work_ring *ring, u32 nr)
 
void rds_iw_ring_resize (struct rds_iw_work_ring *ring, u32 nr)
 
u32 rds_iw_ring_alloc (struct rds_iw_work_ring *ring, u32 val, u32 *pos)
 
void rds_iw_ring_free (struct rds_iw_work_ring *ring, u32 val)
 
void rds_iw_ring_unalloc (struct rds_iw_work_ring *ring, u32 val)
 
int rds_iw_ring_empty (struct rds_iw_work_ring *ring)
 
int rds_iw_ring_low (struct rds_iw_work_ring *ring)
 
u32 rds_iw_ring_oldest (struct rds_iw_work_ring *ring)
 
u32 rds_iw_ring_completed (struct rds_iw_work_ring *ring, u32 wr_id, u32 oldest)
 
void rds_iw_xmit_complete (struct rds_connection *conn)
 
int rds_iw_xmit (struct rds_connection *conn, struct rds_message *rm, unsigned int hdr_off, unsigned int sg, unsigned int off)
 
void rds_iw_send_cq_comp_handler (struct ib_cq *cq, void *context)
 
void rds_iw_send_init_ring (struct rds_iw_connection *ic)
 
void rds_iw_send_clear_ring (struct rds_iw_connection *ic)
 
int rds_iw_xmit_rdma (struct rds_connection *conn, struct rm_rdma_op *op)
 
void rds_iw_send_add_credits (struct rds_connection *conn, unsigned int credits)
 
void rds_iw_advertise_credits (struct rds_connection *conn, unsigned int posted)
 
int rds_iw_send_grab_credits (struct rds_iw_connection *ic, u32 wanted, u32 *adv_credits, int need_posted, int max_posted)
 
 DECLARE_PER_CPU (struct rds_iw_statistics, rds_iw_stats)
 
unsigned int rds_iw_stats_info_copy (struct rds_info_iterator *iter, unsigned int avail)
 
int rds_iw_sysctl_init (void)
 
void rds_iw_sysctl_exit (void)
 

Variables

struct list_head rds_iw_devices
 
struct workqueue_structrds_iw_wq
 
struct rds_transport rds_iw_transport
 
struct ib_client rds_iw_client
 
unsigned int fastreg_pool_size
 
unsigned int fastreg_message_size
 
spinlock_t iw_nodev_conns_lock
 
struct list_head iw_nodev_conns
 
wait_queue_head_t rds_iw_ring_empty_wait
 
unsigned long rds_iw_sysctl_max_send_wr
 
unsigned long rds_iw_sysctl_max_recv_wr
 
unsigned long rds_iw_sysctl_max_unsig_wrs
 
unsigned long rds_iw_sysctl_max_unsig_bytes
 
unsigned long rds_iw_sysctl_max_recv_allocation
 
unsigned int rds_iw_sysctl_flow_control
 

Macro Definition Documentation

#define IB_ACK_IN_FLIGHT   0

Definition at line 193 of file iw.h.

#define IB_ACK_REQUESTED   1

Definition at line 194 of file iw.h.

#define ib_dma_sync_sg_for_cpu   rds_iw_dma_sync_sg_for_cpu

Definition at line 249 of file iw.h.

#define ib_dma_sync_sg_for_device   rds_iw_dma_sync_sg_for_device

Definition at line 263 of file iw.h.

#define IB_GET_POST_CREDITS (   v)    ((v) >> 16)

Definition at line 169 of file iw.h.

#define IB_GET_SEND_CREDITS (   v)    ((v) & 0xffff)

Definition at line 168 of file iw.h.

#define IB_SET_POST_CREDITS (   v)    ((v) << 16)

Definition at line 171 of file iw.h.

#define IB_SET_SEND_CREDITS (   v)    ((v) & 0xffff)

Definition at line 170 of file iw.h.

#define RDS_FASTREG_POOL_SIZE   2048

Definition at line 11 of file iw.h.

#define RDS_FASTREG_SIZE   20

Definition at line 10 of file iw.h.

#define RDS_IW_ACK_WR_ID   ((u64)0xffffffffffffffffULL)

Definition at line 197 of file iw.h.

#define rds_iw_conn_error (   conn,
  fmt... 
)    __rds_iw_conn_error(conn, KERN_WARNING "RDS/IW: " fmt)

Definition at line 296 of file iw.h.

#define RDS_IW_DEFAULT_RECV_WR   1024

Definition at line 16 of file iw.h.

#define RDS_IW_DEFAULT_SEND_WR   256

Definition at line 17 of file iw.h.

#define RDS_IW_FAST_REG_WR_ID   ((u64)0xefefefefefefefefULL)

Definition at line 198 of file iw.h.

#define RDS_IW_LOCAL_INV_WR_ID   ((u64)0xdfdfdfdfdfdfdfdfULL)

Definition at line 199 of file iw.h.

#define RDS_IW_MAX_SGE   8

Definition at line 13 of file iw.h.

#define RDS_IW_RECV_SGE   2

Definition at line 14 of file iw.h.

#define rds_iw_stats_inc (   member)    rds_stats_inc_which(rds_iw_stats, member)

Definition at line 366 of file iw.h.

#define RDS_IW_SUPPORTED_PROTOCOLS   0x00000003 /* minor versions supported */

Definition at line 19 of file iw.h.

#define RDS_PAGE_LAST_OFF   (((PAGE_SIZE / RDS_FRAG_SIZE) - 1) * RDS_FRAG_SIZE)

Definition at line 29 of file iw.h.

Function Documentation

void __rds_iw_conn_error ( struct rds_connection conn,
const char ,
  ... 
)

Definition at line 756 of file iw_cm.c.

void __rds_iw_destroy_conns ( struct list_head list,
spinlock_t list_lock 
)

Definition at line 240 of file iw_rdma.c.

DECLARE_PER_CPU ( struct rds_iw_statistics  ,
rds_iw_stats   
)
void rds_iw_ack_send_complete ( struct rds_iw_connection ic)

Definition at line 543 of file iw_recv.c.

void rds_iw_add_conn ( struct rds_iw_device rds_iwdev,
struct rds_connection conn 
)

Definition at line 202 of file iw_rdma.c.

void rds_iw_advertise_credits ( struct rds_connection conn,
unsigned int  posted 
)

Definition at line 422 of file iw_send.c.

void rds_iw_attempt_ack ( struct rds_iw_connection ic)

Definition at line 516 of file iw_recv.c.

void rds_iw_cm_connect_complete ( struct rds_connection conn,
struct rdma_cm_event event 
)

Definition at line 70 of file iw_cm.c.

int rds_iw_cm_handle_connect ( struct rdma_cm_id cm_id,
struct rdma_cm_event event 
)

Definition at line 377 of file iw_cm.c.

int rds_iw_cm_initiate_connect ( struct rdma_cm_id cm_id)

Definition at line 476 of file iw_cm.c.

int rds_iw_conn_alloc ( struct rds_connection conn,
gfp_t  gfp 
)

Definition at line 691 of file iw_cm.c.

int rds_iw_conn_connect ( struct rds_connection conn)

Definition at line 514 of file iw_cm.c.

void rds_iw_conn_free ( void arg)

Definition at line 731 of file iw_cm.c.

void rds_iw_conn_shutdown ( struct rds_connection conn)

Definition at line 574 of file iw_cm.c.

struct rds_iw_mr_pool* rds_iw_create_mr_pool ( struct rds_iw_device )
read

Definition at line 338 of file iw_rdma.c.

void rds_iw_destroy_mr_pool ( struct rds_iw_mr_pool )

Definition at line 378 of file iw_rdma.c.

void rds_iw_flush_mrs ( void  )

Definition at line 583 of file iw_rdma.c.

void rds_iw_free_mr ( void trans_private,
int  invalidate 
)

Definition at line 555 of file iw_rdma.c.

void* rds_iw_get_mr ( struct scatterlist sg,
unsigned long  nents,
struct rds_sock rs,
u32 key_ret 
)

Definition at line 595 of file iw_rdma.c.

void rds_iw_get_mr_info ( struct rds_iw_device rds_iwdev,
struct rds_info_rdma_connection iinfo 
)

Definition at line 370 of file iw_rdma.c.

int rds_iw_inc_copy_to_user ( struct rds_incoming inc,
struct iovec iov,
size_t  size 
)

Definition at line 306 of file iw_recv.c.

void rds_iw_inc_free ( struct rds_incoming inc)

Definition at line 292 of file iw_recv.c.

int rds_iw_listen_init ( void  )
void rds_iw_listen_stop ( void  )
u64 rds_iw_piggyb_ack ( struct rds_iw_connection ic)

Definition at line 553 of file iw_recv.c.

int rds_iw_recv ( struct rds_connection conn)

Definition at line 865 of file iw_recv.c.

void rds_iw_recv_clear_ring ( struct rds_iw_connection ic)

Definition at line 126 of file iw_recv.c.

void rds_iw_recv_cq_comp_handler ( struct ib_cq cq,
void context 
)

Definition at line 783 of file iw_recv.c.

void rds_iw_recv_exit ( void  )

Definition at line 915 of file iw_recv.c.

int rds_iw_recv_init ( void  )

Definition at line 889 of file iw_recv.c.

void rds_iw_recv_init_ack ( struct rds_iw_connection ic)

Definition at line 362 of file iw_recv.c.

void rds_iw_recv_init_ring ( struct rds_iw_connection ic)

Definition at line 82 of file iw_recv.c.

int rds_iw_recv_refill ( struct rds_connection conn,
gfp_t  kptr_gfp,
gfp_t  page_gfp,
int  prefill 
)

Definition at line 224 of file iw_recv.c.

void rds_iw_recv_tasklet_fn ( unsigned long  data)

Definition at line 833 of file iw_recv.c.

void rds_iw_remove_conn ( struct rds_iw_device rds_iwdev,
struct rds_connection conn 
)

Definition at line 220 of file iw_rdma.c.

u32 rds_iw_ring_alloc ( struct rds_iw_work_ring ring,
u32  val,
u32 pos 
)

Definition at line 97 of file iw_ring.c.

u32 rds_iw_ring_completed ( struct rds_iw_work_ring ring,
u32  wr_id,
u32  oldest 
)

Definition at line 157 of file iw_ring.c.

int rds_iw_ring_empty ( struct rds_iw_work_ring ring)

Definition at line 133 of file iw_ring.c.

void rds_iw_ring_free ( struct rds_iw_work_ring ring,
u32  val 
)

Definition at line 117 of file iw_ring.c.

void rds_iw_ring_init ( struct rds_iw_work_ring ring,
u32  nr 
)

Definition at line 66 of file iw_ring.c.

int rds_iw_ring_low ( struct rds_iw_work_ring ring)

Definition at line 138 of file iw_ring.c.

u32 rds_iw_ring_oldest ( struct rds_iw_work_ring ring)

Definition at line 148 of file iw_ring.c.

void rds_iw_ring_resize ( struct rds_iw_work_ring ring,
u32  nr 
)

Definition at line 84 of file iw_ring.c.

void rds_iw_ring_unalloc ( struct rds_iw_work_ring ring,
u32  val 
)

Definition at line 127 of file iw_ring.c.

void rds_iw_send_add_credits ( struct rds_connection conn,
unsigned int  credits 
)

Definition at line 401 of file iw_send.c.

void rds_iw_send_clear_ring ( struct rds_iw_connection ic)

Definition at line 171 of file iw_send.c.

void rds_iw_send_cq_comp_handler ( struct ib_cq cq,
void context 
)

Definition at line 196 of file iw_send.c.

int rds_iw_send_grab_credits ( struct rds_iw_connection ic,
u32  wanted,
u32 adv_credits,
int  need_posted,
int  max_posted 
)

Definition at line 348 of file iw_send.c.

void rds_iw_send_init_ring ( struct rds_iw_connection ic)

Definition at line 128 of file iw_send.c.

void rds_iw_state_change ( struct sock sk)
unsigned int rds_iw_stats_info_copy ( struct rds_info_iterator iter,
unsigned int  avail 
)

Definition at line 72 of file iw_stats.c.

void rds_iw_sync_mr ( void trans_private,
int  dir 
)

Definition at line 463 of file iw_rdma.c.

void rds_iw_sysctl_exit ( void  )

Definition at line 112 of file iw_sysctl.c.

int rds_iw_sysctl_init ( void  )

Definition at line 118 of file iw_sysctl.c.

int rds_iw_update_cm_id ( struct rds_iw_device rds_iwdev,
struct rdma_cm_id cm_id 
)

Definition at line 179 of file iw_rdma.c.

int rds_iw_xmit ( struct rds_connection conn,
struct rds_message rm,
unsigned int  hdr_off,
unsigned int  sg,
unsigned int  off 
)

Definition at line 496 of file iw_send.c.

void rds_iw_xmit_complete ( struct rds_connection conn)

Definition at line 967 of file iw_send.c.

int rds_iw_xmit_rdma ( struct rds_connection conn,
struct rm_rdma_op *  op 
)

Definition at line 788 of file iw_send.c.

Variable Documentation

unsigned int fastreg_message_size

Definition at line 47 of file iw.c.

unsigned int fastreg_pool_size

Definition at line 46 of file iw.c.

struct list_head iw_nodev_conns
spinlock_t iw_nodev_conns_lock
struct ib_client rds_iw_client

Definition at line 161 of file iw.c.

struct list_head rds_iw_devices

Definition at line 54 of file iw.c.

wait_queue_head_t rds_iw_ring_empty_wait
unsigned int rds_iw_sysctl_flow_control

Definition at line 56 of file iw_sysctl.c.

unsigned long rds_iw_sysctl_max_recv_allocation

Definition at line 43 of file iw_sysctl.c.

unsigned long rds_iw_sysctl_max_recv_wr

Definition at line 42 of file iw_sysctl.c.

unsigned long rds_iw_sysctl_max_send_wr

Definition at line 41 of file iw_sysctl.c.

unsigned long rds_iw_sysctl_max_unsig_bytes

Definition at line 52 of file iw_sysctl.c.

unsigned long rds_iw_sysctl_max_unsig_wrs

Definition at line 48 of file iw_sysctl.c.

struct rds_transport rds_iw_transport

Definition at line 264 of file iw.c.