Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
nes_cm.h File Reference

Go to the source code of this file.

Data Structures

struct  ietf_mpa_v1
 
struct  ietf_rtr_msg
 
struct  ietf_mpa_v2
 
struct  nes_v4_quad
 
struct  option_base
 
struct  option_mss
 
struct  option_windowscale
 
union  all_known_options
 
struct  nes_timer_entry
 
struct  nes_cm_tcp_context
 
struct  nes_cm_listener
 
struct  nes_cm_node
 
struct  nes_cm_info
 
struct  nes_cm_event
 
struct  nes_cm_core
 
struct  nes_cm_ops
 

Macros

#define QUEUE_EVENTS
 
#define NES_MANAGE_APBVT_DEL   0
 
#define NES_MANAGE_APBVT_ADD   1
 
#define NES_MPA_REQUEST_ACCEPT   1
 
#define NES_MPA_REQUEST_REJECT   2
 
#define IEFT_MPA_KEY_REQ   "MPA ID Req Frame"
 
#define IEFT_MPA_KEY_REP   "MPA ID Rep Frame"
 
#define IETF_MPA_KEY_SIZE   16
 
#define IETF_MPA_VERSION   1
 
#define IETF_MAX_PRIV_DATA_LEN   512
 
#define IETF_MPA_FRAME_SIZE   20
 
#define IETF_RTR_MSG_SIZE   4
 
#define IETF_MPA_V2_FLAG   0x10
 
#define IETF_PEER_TO_PEER   0x8000
 
#define IETF_FLPDU_ZERO_LEN   0x4000
 
#define IETF_RDMA0_WRITE   0x8000
 
#define IETF_RDMA0_READ   0x4000
 
#define IETF_NO_IRD_ORD   0x3FFF
 
#define ietf_mpa_req_resp_frame   ietf_mpa_frame
 
#define NES_PASSIVE_STATE_INDICATED   0
 
#define NES_DO_NOT_SEND_RESET_EVENT   1
 
#define NES_SEND_RESET_EVENT   2
 
#define MAX_NES_IFS   4
 
#define SET_ACK   1
 
#define SET_SYN   2
 
#define SET_FIN   4
 
#define SET_RST   8
 
#define TCP_OPTIONS_PADDING   3
 
#define NES_DEFAULT_RETRYS   64
 
#define NES_DEFAULT_RETRANS   8
 
#define NES_RETRY_TIMEOUT   (3000*HZ/1000)
 
#define NES_SHORT_TIME   (10)
 
#define NES_LONG_TIME   (2000*HZ/1000)
 
#define NES_MAX_TIMEOUT   ((unsigned long) (12*HZ))
 
#define NES_CM_HASHTABLE_SIZE   1024
 
#define NES_CM_TCP_TIMER_INTERVAL   3000
 
#define NES_CM_DEFAULT_MTU   1540
 
#define NES_CM_DEFAULT_FRAME_CNT   10
 
#define NES_CM_THREAD_STACK_SIZE   256
 
#define NES_CM_DEFAULT_RCV_WND   64240
 
#define NES_CM_DEFAULT_RCV_WND_SCALED   256960
 
#define NES_CM_DEFAULT_RCV_WND_SCALE   2
 
#define NES_CM_DEFAULT_FREE_PKTS   0x000A
 
#define NES_CM_FREE_PKT_LO_WATERMARK   2
 
#define NES_CM_DEFAULT_MSS   536
 
#define NES_CM_DEF_SEQ   0x159bf75f
 
#define NES_CM_DEF_LOCAL_ID   0x3b47
 
#define NES_CM_DEF_SEQ2   0x18ed5740
 
#define NES_CM_DEF_LOCAL_ID2   0xb807
 
#define MAX_CM_BUFFER   (IETF_MPA_FRAME_SIZE + IETF_RTR_MSG_SIZE + IETF_MAX_PRIV_DATA_LEN)
 
#define nes_cm_tsa_context   nes_qp_context
 
#define NES_CM_SET_PKT_SIZE   (1 << 1)
 
#define NES_CM_SET_FREE_PKT_Q_SIZE   (1 << 2)
 

Typedefs

typedef u32 nes_addr_t
 

Enumerations

enum  ietf_mpa_flags { IETF_MPA_FLAGS_MARKERS = 0x80, IETF_MPA_FLAGS_CRC = 0x40, IETF_MPA_FLAGS_REJECT = 0x20 }
 
enum  nes_timer_type { NES_TIMER_TYPE_SEND, NES_TIMER_TYPE_RECV, NES_TIMER_NODE_CLEANUP, NES_TIMER_TYPE_CLOSE }
 
enum  option_numbers {
  OPTION_NUMBER_END, OPTION_NUMBER_NONE, OPTION_NUMBER_MSS, OPTION_NUMBER_WINDOW_SCALE,
  OPTION_NUMBER_SACK_PERM, OPTION_NUMBER_SACK, OPTION_NUMBER_WRITE0 = 0xbc
}
 
enum  nes_cm_node_state {
  NES_CM_STATE_UNKNOWN, NES_CM_STATE_INITED, NES_CM_STATE_LISTENING, NES_CM_STATE_SYN_RCVD,
  NES_CM_STATE_SYN_SENT, NES_CM_STATE_ONE_SIDE_ESTABLISHED, NES_CM_STATE_ESTABLISHED, NES_CM_STATE_ACCEPTING,
  NES_CM_STATE_MPAREQ_SENT, NES_CM_STATE_MPAREQ_RCVD, NES_CM_STATE_MPAREJ_RCVD, NES_CM_STATE_TSA,
  NES_CM_STATE_FIN_WAIT1, NES_CM_STATE_FIN_WAIT2, NES_CM_STATE_CLOSE_WAIT, NES_CM_STATE_TIME_WAIT,
  NES_CM_STATE_LAST_ACK, NES_CM_STATE_CLOSING, NES_CM_STATE_LISTENER_DESTROYED, NES_CM_STATE_CLOSED
}
 
enum  mpa_frame_version { IETF_MPA_V1 = 1, IETF_MPA_V2 = 2 }
 
enum  mpa_frame_key { MPA_KEY_REQUEST, MPA_KEY_REPLY }
 
enum  send_rdma0 { SEND_RDMA_READ_ZERO = 1, SEND_RDMA_WRITE_ZERO = 2 }
 
enum  nes_tcpip_pkt_type {
  NES_PKT_TYPE_UNKNOWN, NES_PKT_TYPE_SYN, NES_PKT_TYPE_SYNACK, NES_PKT_TYPE_ACK,
  NES_PKT_TYPE_FIN, NES_PKT_TYPE_RST
}
 
enum  nes_cm_conn_type { NES_CM_IWARP_CONN_TYPE }
 
enum  nes_cm_listener_state { NES_CM_LISTENER_PASSIVE_STATE = 1, NES_CM_LISTENER_ACTIVE_STATE = 2, NES_CM_LISTENER_EITHER_STATE = 3 }
 
enum  nes_cm_event_type {
  NES_CM_EVENT_UNKNOWN, NES_CM_EVENT_ESTABLISHED, NES_CM_EVENT_MPA_REQ, NES_CM_EVENT_MPA_CONNECT,
  NES_CM_EVENT_MPA_ACCEPT, NES_CM_EVENT_MPA_REJECT, NES_CM_EVENT_MPA_ESTABLISHED, NES_CM_EVENT_CONNECTED,
  NES_CM_EVENT_CLOSED, NES_CM_EVENT_RESET, NES_CM_EVENT_DROPPED_PKT, NES_CM_EVENT_CLOSE_IMMED,
  NES_CM_EVENT_CLOSE_HARD, NES_CM_EVENT_CLOSE_CLEAN, NES_CM_EVENT_ABORTED, NES_CM_EVENT_SEND_FIRST
}
 

Functions

int schedule_nes_timer (struct nes_cm_node *, struct sk_buff *, enum nes_timer_type, int, int)
 
int nes_accept (struct iw_cm_id *, struct iw_cm_conn_param *)
 
int nes_reject (struct iw_cm_id *, const void *, u8)
 
int nes_connect (struct iw_cm_id *, struct iw_cm_conn_param *)
 
int nes_create_listen (struct iw_cm_id *, int)
 
int nes_destroy_listen (struct iw_cm_id *)
 
int nes_cm_recv (struct sk_buff *, struct net_device *)
 
int nes_cm_start (void)
 
int nes_cm_stop (void)
 
int nes_add_ref_cm_node (struct nes_cm_node *cm_node)
 
int nes_rem_ref_cm_node (struct nes_cm_node *cm_node)
 

Macro Definition Documentation

#define IEFT_MPA_KEY_REP   "MPA ID Rep Frame"

Definition at line 47 of file nes_cm.h.

#define IEFT_MPA_KEY_REQ   "MPA ID Req Frame"

Definition at line 46 of file nes_cm.h.

#define IETF_FLPDU_ZERO_LEN   0x4000

Definition at line 57 of file nes_cm.h.

#define IETF_MAX_PRIV_DATA_LEN   512

Definition at line 50 of file nes_cm.h.

#define IETF_MPA_FRAME_SIZE   20

Definition at line 51 of file nes_cm.h.

#define IETF_MPA_KEY_SIZE   16

Definition at line 48 of file nes_cm.h.

#define ietf_mpa_req_resp_frame   ietf_mpa_frame

Definition at line 76 of file nes_cm.h.

#define IETF_MPA_V2_FLAG   0x10

Definition at line 53 of file nes_cm.h.

#define IETF_MPA_VERSION   1

Definition at line 49 of file nes_cm.h.

#define IETF_NO_IRD_ORD   0x3FFF

Definition at line 60 of file nes_cm.h.

#define IETF_PEER_TO_PEER   0x8000

Definition at line 56 of file nes_cm.h.

#define IETF_RDMA0_READ   0x4000

Definition at line 59 of file nes_cm.h.

#define IETF_RDMA0_WRITE   0x8000

Definition at line 58 of file nes_cm.h.

#define IETF_RTR_MSG_SIZE   4

Definition at line 52 of file nes_cm.h.

Definition at line 197 of file nes_cm.h.

#define MAX_NES_IFS   4

Definition at line 111 of file nes_cm.h.

#define NES_CM_DEF_LOCAL_ID   0x3b47

Definition at line 193 of file nes_cm.h.

#define NES_CM_DEF_LOCAL_ID2   0xb807

Definition at line 196 of file nes_cm.h.

#define NES_CM_DEF_SEQ   0x159bf75f

Definition at line 192 of file nes_cm.h.

#define NES_CM_DEF_SEQ2   0x18ed5740

Definition at line 195 of file nes_cm.h.

#define NES_CM_DEFAULT_FRAME_CNT   10

Definition at line 182 of file nes_cm.h.

#define NES_CM_DEFAULT_FREE_PKTS   0x000A

Definition at line 187 of file nes_cm.h.

#define NES_CM_DEFAULT_MSS   536

Definition at line 190 of file nes_cm.h.

#define NES_CM_DEFAULT_MTU   1540

Definition at line 181 of file nes_cm.h.

#define NES_CM_DEFAULT_RCV_WND   64240

Definition at line 184 of file nes_cm.h.

#define NES_CM_DEFAULT_RCV_WND_SCALE   2

Definition at line 186 of file nes_cm.h.

#define NES_CM_DEFAULT_RCV_WND_SCALED   256960

Definition at line 185 of file nes_cm.h.

#define NES_CM_FREE_PKT_LO_WATERMARK   2

Definition at line 188 of file nes_cm.h.

#define NES_CM_HASHTABLE_SIZE   1024

Definition at line 179 of file nes_cm.h.

#define NES_CM_SET_FREE_PKT_Q_SIZE   (1 << 2)

Definition at line 431 of file nes_cm.h.

#define NES_CM_SET_PKT_SIZE   (1 << 1)

Definition at line 430 of file nes_cm.h.

#define NES_CM_TCP_TIMER_INTERVAL   3000

Definition at line 180 of file nes_cm.h.

#define NES_CM_THREAD_STACK_SIZE   256

Definition at line 183 of file nes_cm.h.

#define nes_cm_tsa_context   nes_qp_context

Definition at line 201 of file nes_cm.h.

#define NES_DEFAULT_RETRANS   8

Definition at line 169 of file nes_cm.h.

#define NES_DEFAULT_RETRYS   64

Definition at line 168 of file nes_cm.h.

#define NES_DO_NOT_SEND_RESET_EVENT   1

Definition at line 108 of file nes_cm.h.

#define NES_LONG_TIME   (2000*HZ/1000)

Definition at line 176 of file nes_cm.h.

#define NES_MANAGE_APBVT_ADD   1

Definition at line 40 of file nes_cm.h.

#define NES_MANAGE_APBVT_DEL   0

Definition at line 39 of file nes_cm.h.

#define NES_MAX_TIMEOUT   ((unsigned long) (12*HZ))

Definition at line 177 of file nes_cm.h.

#define NES_MPA_REQUEST_ACCEPT   1

Definition at line 42 of file nes_cm.h.

#define NES_MPA_REQUEST_REJECT   2

Definition at line 43 of file nes_cm.h.

#define NES_PASSIVE_STATE_INDICATED   0

Definition at line 107 of file nes_cm.h.

#define NES_RETRY_TIMEOUT   (3000*HZ/1000)

Definition at line 173 of file nes_cm.h.

#define NES_SEND_RESET_EVENT   2

Definition at line 109 of file nes_cm.h.

#define NES_SHORT_TIME   (10)

Definition at line 175 of file nes_cm.h.

#define QUEUE_EVENTS

Definition at line 37 of file nes_cm.h.

#define SET_ACK   1

Definition at line 113 of file nes_cm.h.

#define SET_FIN   4

Definition at line 115 of file nes_cm.h.

#define SET_RST   8

Definition at line 116 of file nes_cm.h.

#define SET_SYN   2

Definition at line 114 of file nes_cm.h.

#define TCP_OPTIONS_PADDING   3

Definition at line 118 of file nes_cm.h.

Typedef Documentation

typedef u32 nes_addr_t

Definition at line 199 of file nes_cm.h.

Enumeration Type Documentation

Enumerator:
IETF_MPA_FLAGS_MARKERS 
IETF_MPA_FLAGS_CRC 
IETF_MPA_FLAGS_REJECT 

Definition at line 62 of file nes_cm.h.

Enumerator:
MPA_KEY_REQUEST 
MPA_KEY_REPLY 

Definition at line 234 of file nes_cm.h.

Enumerator:
IETF_MPA_V1 
IETF_MPA_V2 

Definition at line 229 of file nes_cm.h.

Enumerator:
NES_CM_IWARP_CONN_TYPE 

Definition at line 255 of file nes_cm.h.

Enumerator:
NES_CM_EVENT_UNKNOWN 
NES_CM_EVENT_ESTABLISHED 
NES_CM_EVENT_MPA_REQ 
NES_CM_EVENT_MPA_CONNECT 
NES_CM_EVENT_MPA_ACCEPT 
NES_CM_EVENT_MPA_REJECT 
NES_CM_EVENT_MPA_ESTABLISHED 
NES_CM_EVENT_CONNECTED 
NES_CM_EVENT_CLOSED 
NES_CM_EVENT_RESET 
NES_CM_EVENT_DROPPED_PKT 
NES_CM_EVENT_CLOSE_IMMED 
NES_CM_EVENT_CLOSE_HARD 
NES_CM_EVENT_CLOSE_CLEAN 
NES_CM_EVENT_ABORTED 
NES_CM_EVENT_SEND_FIRST 

Definition at line 370 of file nes_cm.h.

Enumerator:
NES_CM_LISTENER_PASSIVE_STATE 
NES_CM_LISTENER_ACTIVE_STATE 
NES_CM_LISTENER_EITHER_STATE 

Definition at line 284 of file nes_cm.h.

Enumerator:
NES_CM_STATE_UNKNOWN 
NES_CM_STATE_INITED 
NES_CM_STATE_LISTENING 
NES_CM_STATE_SYN_RCVD 
NES_CM_STATE_SYN_SENT 
NES_CM_STATE_ONE_SIDE_ESTABLISHED 
NES_CM_STATE_ESTABLISHED 
NES_CM_STATE_ACCEPTING 
NES_CM_STATE_MPAREQ_SENT 
NES_CM_STATE_MPAREQ_RCVD 
NES_CM_STATE_MPAREJ_RCVD 
NES_CM_STATE_TSA 
NES_CM_STATE_FIN_WAIT1 
NES_CM_STATE_FIN_WAIT2 
NES_CM_STATE_CLOSE_WAIT 
NES_CM_STATE_TIME_WAIT 
NES_CM_STATE_LAST_ACK 
NES_CM_STATE_CLOSING 
NES_CM_STATE_LISTENER_DESTROYED 
NES_CM_STATE_CLOSED 

Definition at line 206 of file nes_cm.h.

Enumerator:
NES_PKT_TYPE_UNKNOWN 
NES_PKT_TYPE_SYN 
NES_PKT_TYPE_SYNACK 
NES_PKT_TYPE_ACK 
NES_PKT_TYPE_FIN 
NES_PKT_TYPE_RST 

Definition at line 244 of file nes_cm.h.

Enumerator:
NES_TIMER_TYPE_SEND 
NES_TIMER_TYPE_RECV 
NES_TIMER_NODE_CLEANUP 
NES_TIMER_TYPE_CLOSE 

Definition at line 100 of file nes_cm.h.

Enumerator:
OPTION_NUMBER_END 
OPTION_NUMBER_NONE 
OPTION_NUMBER_MSS 
OPTION_NUMBER_WINDOW_SCALE 
OPTION_NUMBER_SACK_PERM 
OPTION_NUMBER_SACK 
OPTION_NUMBER_WRITE0 

Definition at line 125 of file nes_cm.h.

enum send_rdma0
Enumerator:
SEND_RDMA_READ_ZERO 
SEND_RDMA_WRITE_ZERO 

Definition at line 239 of file nes_cm.h.

Function Documentation

int nes_accept ( struct iw_cm_id cm_id,
struct iw_cm_conn_param conn_param 
)

nes_accept

Definition at line 2988 of file nes_cm.c.

int nes_add_ref_cm_node ( struct nes_cm_node cm_node)

Definition at line 159 of file nes_cm.c.

int nes_cm_recv ( struct sk_buff skb,
struct net_device netdevice 
)

nes_cm_recv

Definition at line 3445 of file nes_cm.c.

int nes_cm_start ( void  )

nes_cm_start Start and init a cm core module

Definition at line 3464 of file nes_cm.c.

int nes_cm_stop ( void  )

nes_cm_stop stop and dealloc all cm core instances

Definition at line 3480 of file nes_cm.c.

int nes_connect ( struct iw_cm_id cm_id,
struct iw_cm_conn_param conn_param 
)

nes_connect setup and launch cm connect node

Definition at line 3271 of file nes_cm.c.

int nes_create_listen ( struct iw_cm_id cm_id,
int  backlog 
)

nes_create_listen

Definition at line 3366 of file nes_cm.c.

int nes_destroy_listen ( struct iw_cm_id cm_id)

nes_destroy_listen

Definition at line 3429 of file nes_cm.c.

int nes_reject ( struct iw_cm_id cm_id,
const void pdata,
u8  pdata_len 
)

nes_reject

Definition at line 3238 of file nes_cm.c.

int nes_rem_ref_cm_node ( struct nes_cm_node cm_node)

Definition at line 164 of file nes_cm.c.

int schedule_nes_timer ( struct nes_cm_node cm_node,
struct sk_buff skb,
enum nes_timer_type  type,
int  send_retrans,
int  close_when_complete 
)

schedule_nes_timer note - cm_node needs to be protected before calling this. Encase in: rem_ref_cm_node(cm_core, cm_node);add_ref_cm_node(cm_node);

Definition at line 666 of file nes_cm.c.