aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/iscsi_tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/iscsi_tcp.h')
-rw-r--r--drivers/scsi/iscsi_tcp.h44
1 files changed, 18 insertions, 26 deletions
diff --git a/drivers/scsi/iscsi_tcp.h b/drivers/scsi/iscsi_tcp.h
index 6a4ee704e46e..32736831790e 100644
--- a/drivers/scsi/iscsi_tcp.h
+++ b/drivers/scsi/iscsi_tcp.h
@@ -31,26 +31,25 @@
31#define IN_PROGRESS_DDIGEST_RECV 0x3 31#define IN_PROGRESS_DDIGEST_RECV 0x3
32 32
33/* xmit state machine */ 33/* xmit state machine */
34#define XMSTATE_IDLE 0x0 34#define XMSTATE_IDLE 0x0
35#define XMSTATE_R_HDR 0x1 35#define XMSTATE_R_HDR 0x1
36#define XMSTATE_W_HDR 0x2 36#define XMSTATE_W_HDR 0x2
37#define XMSTATE_IMM_HDR 0x4 37#define XMSTATE_IMM_HDR 0x4
38#define XMSTATE_IMM_DATA 0x8 38#define XMSTATE_IMM_DATA 0x8
39#define XMSTATE_UNS_INIT 0x10 39#define XMSTATE_UNS_INIT 0x10
40#define XMSTATE_UNS_HDR 0x20 40#define XMSTATE_UNS_HDR 0x20
41#define XMSTATE_UNS_DATA 0x40 41#define XMSTATE_UNS_DATA 0x40
42#define XMSTATE_SOL_HDR 0x80 42#define XMSTATE_SOL_HDR 0x80
43#define XMSTATE_SOL_DATA 0x100 43#define XMSTATE_SOL_DATA 0x100
44#define XMSTATE_W_PAD 0x200 44#define XMSTATE_W_PAD 0x200
45#define XMSTATE_DATA_DIGEST 0x400 45#define XMSTATE_W_RESEND_PAD 0x400
46 46#define XMSTATE_W_RESEND_DATA_DIGEST 0x800
47#define ISCSI_CONN_RCVBUF_MIN 262144 47
48#define ISCSI_CONN_SNDBUF_MIN 262144
49#define ISCSI_PAD_LEN 4 48#define ISCSI_PAD_LEN 4
50#define ISCSI_R2T_MAX 16
51#define ISCSI_SG_TABLESIZE SG_ALL 49#define ISCSI_SG_TABLESIZE SG_ALL
52#define ISCSI_TCP_MAX_CMD_LEN 16 50#define ISCSI_TCP_MAX_CMD_LEN 16
53 51
52struct crypto_hash;
54struct socket; 53struct socket;
55 54
56/* Socket connection recieve helper */ 55/* Socket connection recieve helper */
@@ -84,9 +83,6 @@ struct iscsi_tcp_conn {
84 /* iSCSI connection-wide sequencing */ 83 /* iSCSI connection-wide sequencing */
85 int hdr_size; /* PDU header size */ 84 int hdr_size; /* PDU header size */
86 85
87 struct crypto_tfm *rx_tfm; /* CRC32C (Rx) */
88 struct crypto_tfm *data_rx_tfm; /* CRC32C (Rx) for data */
89
90 /* control data */ 86 /* control data */
91 struct iscsi_tcp_recv in; /* TCP receive context */ 87 struct iscsi_tcp_recv in; /* TCP receive context */
92 int in_progress; /* connection state machine */ 88 int in_progress; /* connection state machine */
@@ -96,9 +92,9 @@ struct iscsi_tcp_conn {
96 void (*old_state_change)(struct sock *); 92 void (*old_state_change)(struct sock *);
97 void (*old_write_space)(struct sock *); 93 void (*old_write_space)(struct sock *);
98 94
99 /* xmit */ 95 /* data and header digests */
100 struct crypto_tfm *tx_tfm; /* CRC32C (Tx) */ 96 struct hash_desc tx_hash; /* CRC32C (Tx) */
101 struct crypto_tfm *data_tx_tfm; /* CRC32C (Tx) for data */ 97 struct hash_desc rx_hash; /* CRC32C (Rx) */
102 98
103 /* MIB custom statistics */ 99 /* MIB custom statistics */
104 uint32_t sendpage_failures_cnt; 100 uint32_t sendpage_failures_cnt;
@@ -157,19 +153,15 @@ struct iscsi_tcp_cmd_task {
157 struct scatterlist *bad_sg; /* assert statement */ 153 struct scatterlist *bad_sg; /* assert statement */
158 int sg_count; /* SG's to process */ 154 int sg_count; /* SG's to process */
159 uint32_t exp_r2tsn; 155 uint32_t exp_r2tsn;
160 int r2t_data_count; /* R2T Data-Out bytes */
161 int data_offset; 156 int data_offset;
162 struct iscsi_r2t_info *r2t; /* in progress R2T */ 157 struct iscsi_r2t_info *r2t; /* in progress R2T */
163 struct iscsi_queue r2tpool; 158 struct iscsi_queue r2tpool;
164 struct kfifo *r2tqueue; 159 struct kfifo *r2tqueue;
165 struct iscsi_r2t_info **r2ts; 160 struct iscsi_r2t_info **r2ts;
166 uint32_t datadigest; /* for recover digest */
167 int digest_count; 161 int digest_count;
168 uint32_t immdigest; /* for imm data */ 162 uint32_t immdigest; /* for imm data */
169 struct iscsi_buf immbuf; /* for imm data digest */ 163 struct iscsi_buf immbuf; /* for imm data digest */
170 struct iscsi_data_task *dtask; /* data task in progress*/
171 struct iscsi_data_task unsol_dtask; /* unsol data task */ 164 struct iscsi_data_task unsol_dtask; /* unsol data task */
172 int digest_offset; /* for partial buff digest */
173}; 165};
174 166
175#endif /* ISCSI_H */ 167#endif /* ISCSI_H */