Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
iwch_cm.h File Reference
#include <linux/inet.h>
#include <linux/wait.h>
#include <linux/spinlock.h>
#include <linux/kref.h>
#include <rdma/ib_verbs.h>
#include <rdma/iw_cm.h>
#include "cxgb3_offload.h"
#include "iwch_provider.h"

Go to the source code of this file.

Data Structures

struct  mpa_message
 
struct  terminate_message
 
struct  iwch_ep_common
 
struct  iwch_listen_ep
 
struct  iwch_ep
 

Macros

#define MPA_KEY_REQ   "MPA ID Req Frame"
 
#define MPA_KEY_REP   "MPA ID Rep Frame"
 
#define MPA_MAX_PRIVATE_DATA   256
 
#define MPA_REV   0 /* XXX - amso1100 uses rev 0 ! */
 
#define MPA_REJECT   0x20
 
#define MPA_CRC   0x40
 
#define MPA_MARKERS   0x80
 
#define MPA_FLAGS_MASK   0xE0
 
#define put_ep(ep)
 
#define get_ep(ep)
 
#define TERM_MAX_LENGTH   (sizeof(struct terminate_message) + 2 + 18 + 28)
 

Enumerations

enum  iwch_layers_types {
  LAYER_RDMAP = 0x00, LAYER_DDP = 0x10, LAYER_MPA = 0x20, RDMAP_LOCAL_CATA = 0x00,
  RDMAP_REMOTE_PROT = 0x01, RDMAP_REMOTE_OP = 0x02, DDP_LOCAL_CATA = 0x00, DDP_TAGGED_ERR = 0x01,
  DDP_UNTAGGED_ERR = 0x02, DDP_LLP = 0x03
}
 
enum  iwch_rdma_ecodes {
  RDMAP_INV_STAG = 0x00, RDMAP_BASE_BOUNDS = 0x01, RDMAP_ACC_VIOL = 0x02, RDMAP_STAG_NOT_ASSOC = 0x03,
  RDMAP_TO_WRAP = 0x04, RDMAP_INV_VERS = 0x05, RDMAP_INV_OPCODE = 0x06, RDMAP_STREAM_CATA = 0x07,
  RDMAP_GLOBAL_CATA = 0x08, RDMAP_CANT_INV_STAG = 0x09, RDMAP_UNSPECIFIED = 0xff
}
 
enum  iwch_ddp_ecodes {
  DDPT_INV_STAG = 0x00, DDPT_BASE_BOUNDS = 0x01, DDPT_STAG_NOT_ASSOC = 0x02, DDPT_TO_WRAP = 0x03,
  DDPT_INV_VERS = 0x04, DDPU_INV_QN = 0x01, DDPU_INV_MSN_NOBUF = 0x02, DDPU_INV_MSN_RANGE = 0x03,
  DDPU_INV_MO = 0x04, DDPU_MSG_TOOBIG = 0x05, DDPU_INV_VERS = 0x06
}
 
enum  iwch_mpa_ecodes { MPA_CRC_ERR = 0x02, MPA_MARKER_ERR = 0x03 }
 
enum  iwch_ep_state {
  IDLE = 0, LISTEN, CONNECTING, MPA_REQ_WAIT,
  MPA_REQ_SENT, MPA_REQ_RCVD, MPA_REP_SENT, FPDU_MODE,
  ABORTING, CLOSING, MORIBUND, DEAD
}
 
enum  iwch_ep_flags { PEER_ABORT_IN_PROGRESS = 0, ABORT_REQ_IN_PROGRESS = 1, RELEASE_RESOURCES = 2, CLOSE_SENT = 3 }
 

Functions

int iwch_connect (struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 
int iwch_create_listen (struct iw_cm_id *cm_id, int backlog)
 
int iwch_destroy_listen (struct iw_cm_id *cm_id)
 
int iwch_reject_cr (struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len)
 
int iwch_accept_cr (struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
 
int iwch_ep_disconnect (struct iwch_ep *ep, int abrupt, gfp_t gfp)
 
int iwch_quiesce_tid (struct iwch_ep *ep)
 
int iwch_resume_tid (struct iwch_ep *ep)
 
void __free_ep (struct kref *kref)
 
void iwch_rearp (struct iwch_ep *ep)
 
int iwch_ep_redirect (void *ctx, struct dst_entry *old, struct dst_entry *new, struct l2t_entry *l2t)
 
int __init iwch_cm_init (void)
 
void __exit iwch_cm_term (void)
 

Variables

int peer2peer
 

Macro Definition Documentation

#define get_ep (   ep)
Value:
{ \
PDBG("get_ep (via %s:%u) ep %p, refcnt %d\n", __func__, __LINE__, \
ep, atomic_read(&((ep)->kref.refcount))); \
kref_get(&((ep)->kref)); \
}

Definition at line 63 of file iwch_cm.h.

#define MPA_CRC   0x40

Definition at line 52 of file iwch_cm.h.

#define MPA_FLAGS_MASK   0xE0

Definition at line 54 of file iwch_cm.h.

#define MPA_KEY_REP   "MPA ID Rep Frame"

Definition at line 47 of file iwch_cm.h.

#define MPA_KEY_REQ   "MPA ID Req Frame"

Definition at line 46 of file iwch_cm.h.

#define MPA_MARKERS   0x80

Definition at line 53 of file iwch_cm.h.

#define MPA_MAX_PRIVATE_DATA   256

Definition at line 49 of file iwch_cm.h.

#define MPA_REJECT   0x20

Definition at line 51 of file iwch_cm.h.

#define MPA_REV   0 /* XXX - amso1100 uses rev 0 ! */

Definition at line 50 of file iwch_cm.h.

#define put_ep (   ep)
Value:
{ \
PDBG("put_ep (via %s:%u) ep %p refcnt %d\n", __func__, __LINE__, \
ep, atomic_read(&((ep)->kref.refcount))); \
WARN_ON(atomic_read(&((ep)->kref.refcount)) < 1); \
kref_put(&((ep)->kref), __free_ep); \
}

Definition at line 56 of file iwch_cm.h.

#define TERM_MAX_LENGTH   (sizeof(struct terminate_message) + 2 + 18 + 28)

Definition at line 84 of file iwch_cm.h.

Enumeration Type Documentation

Enumerator:
DDPT_INV_STAG 
DDPT_BASE_BOUNDS 
DDPT_STAG_NOT_ASSOC 
DDPT_TO_WRAP 
DDPT_INV_VERS 
DDPU_INV_QN 
DDPU_INV_MSN_NOBUF 
DDPU_INV_MSN_RANGE 
DDPU_INV_MO 
DDPU_MSG_TOOBIG 
DDPU_INV_VERS 

Definition at line 113 of file iwch_cm.h.

Enumerator:
PEER_ABORT_IN_PROGRESS 
ABORT_REQ_IN_PROGRESS 
RELEASE_RESOURCES 
CLOSE_SENT 

Definition at line 147 of file iwch_cm.h.

Enumerator:
IDLE 
LISTEN 
CONNECTING 
MPA_REQ_WAIT 
MPA_REQ_SENT 
MPA_REQ_RCVD 
MPA_REP_SENT 
FPDU_MODE 
ABORTING 
CLOSING 
MORIBUND 
DEAD 

Definition at line 132 of file iwch_cm.h.

Enumerator:
LAYER_RDMAP 
LAYER_DDP 
LAYER_MPA 
RDMAP_LOCAL_CATA 
RDMAP_REMOTE_PROT 
RDMAP_REMOTE_OP 
DDP_LOCAL_CATA 
DDP_TAGGED_ERR 
DDP_UNTAGGED_ERR 
DDP_LLP 

Definition at line 86 of file iwch_cm.h.

Enumerator:
MPA_CRC_ERR 
MPA_MARKER_ERR 

Definition at line 127 of file iwch_cm.h.

Enumerator:
RDMAP_INV_STAG 
RDMAP_BASE_BOUNDS 
RDMAP_ACC_VIOL 
RDMAP_STAG_NOT_ASSOC 
RDMAP_TO_WRAP 
RDMAP_INV_VERS 
RDMAP_INV_OPCODE 
RDMAP_STREAM_CATA 
RDMAP_GLOBAL_CATA 
RDMAP_CANT_INV_STAG 
RDMAP_UNSPECIFIED 

Definition at line 99 of file iwch_cm.h.

Function Documentation

void __free_ep ( struct kref kref)

Definition at line 281 of file iwch_cm.c.

int iwch_accept_cr ( struct iw_cm_id cm_id,
struct iw_cm_conn_param conn_param 
)

Definition at line 1791 of file iwch_cm.c.

int __init iwch_cm_init ( void  )

Definition at line 2240 of file iwch_cm.c.

void __exit iwch_cm_term ( void  )

Definition at line 2251 of file iwch_cm.c.

int iwch_connect ( struct iw_cm_id cm_id,
struct iw_cm_conn_param conn_param 
)

Definition at line 1885 of file iwch_cm.c.

int iwch_create_listen ( struct iw_cm_id cm_id,
int  backlog 
)

Definition at line 1975 of file iwch_cm.c.

int iwch_destroy_listen ( struct iw_cm_id cm_id)

Definition at line 2029 of file iwch_cm.c.

int iwch_ep_disconnect ( struct iwch_ep ep,
int  abrupt,
gfp_t  gfp 
)

Definition at line 2052 of file iwch_cm.c.

int iwch_ep_redirect ( void ctx,
struct dst_entry old,
struct dst_entry new,
struct l2t_entry l2t 
)

Definition at line 2123 of file iwch_cm.c.

int iwch_quiesce_tid ( struct iwch_ep ep)

Definition at line 187 of file iwch_cm.c.

void iwch_rearp ( struct iwch_ep ep)
int iwch_reject_cr ( struct iw_cm_id cm_id,
const void pdata,
u8  pdata_len 
)

Definition at line 1770 of file iwch_cm.c.

int iwch_resume_tid ( struct iwch_ep ep)

Definition at line 208 of file iwch_cm.c.

Variable Documentation

int peer2peer

Definition at line 67 of file iwch_cm.c.