• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* From iscsi_iser.h */
2 
3 struct iser_hdr {
4 	u8	flags;
5 	u8	rsvd[3];
6 	__be32	write_stag; /* write rkey */
7 	__be64	write_va;
8 	__be32	read_stag;  /* read rkey */
9 	__be64	read_va;
10 } __packed;
11 
12 /*Constant PDU lengths calculations */
13 #define ISER_HEADERS_LEN  (sizeof(struct iser_hdr) + sizeof(struct iscsi_hdr))
14 
15 #define ISER_RECV_DATA_SEG_LEN  8192
16 #define ISER_RX_PAYLOAD_SIZE    (ISER_HEADERS_LEN + ISER_RECV_DATA_SEG_LEN)
17 #define ISER_RX_LOGIN_SIZE      (ISER_HEADERS_LEN + ISCSI_DEF_MAX_RECV_SEG_LEN)
18 
19 /* QP settings */
20 /* Maximal bounds on received asynchronous PDUs */
21 #define ISERT_MAX_TX_MISC_PDUS	4 /* NOOP_IN(2) , ASYNC_EVENT(2)   */
22 
23 #define ISERT_MAX_RX_MISC_PDUS	6 /* NOOP_OUT(2), TEXT(1),         *
24 				   * SCSI_TMFUNC(2), LOGOUT(1) */
25 
26 #define ISCSI_DEF_XMIT_CMDS_MAX 128 /* from libiscsi.h, must be power of 2 */
27 
28 #define ISERT_QP_MAX_RECV_DTOS	(ISCSI_DEF_XMIT_CMDS_MAX)
29 
30 #define ISERT_MIN_POSTED_RX	(ISCSI_DEF_XMIT_CMDS_MAX >> 2)
31 
32 #define ISERT_INFLIGHT_DATAOUTS	8
33 
34 #define ISERT_QP_MAX_REQ_DTOS	(ISCSI_DEF_XMIT_CMDS_MAX *    \
35 				(1 + ISERT_INFLIGHT_DATAOUTS) + \
36 				ISERT_MAX_TX_MISC_PDUS	+ \
37 				ISERT_MAX_RX_MISC_PDUS)
38 
39 #define ISER_RX_PAD_SIZE	(ISER_RECV_DATA_SEG_LEN + 4096 - \
40 		(ISER_RX_PAYLOAD_SIZE + sizeof(u64) + sizeof(struct ib_sge)))
41 
42 #define ISER_VER	0x10
43 #define ISER_WSV	0x08
44 #define ISER_RSV	0x04
45 #define ISCSI_CTRL	0x10
46 #define ISER_HELLO	0x20
47 #define ISER_HELLORPLY	0x30
48