diff options
author | James Bottomley <jejb@sparkweed.localdomain> | 2006-09-23 16:33:43 -0400 |
---|---|---|
committer | James Bottomley <jejb@sparkweed.localdomain> | 2006-09-23 16:33:43 -0400 |
commit | c9802cd9574a80444e689c7525627b40d7dc3a06 (patch) | |
tree | 5954e2ac7e97023b51d36127963a1e9262fbcfe0 /drivers/scsi/iscsi_tcp.h | |
parent | 3eeab61aa3ddd3c0bedb7449ada1599de22fdb5a (diff) | |
parent | 2d2f8d59b14bec6c745e219a350ac51d9e00673f (diff) |
Merge mulgrave-w:git/scsi-misc-2.6
Conflicts:
drivers/scsi/iscsi_tcp.c
drivers/scsi/iscsi_tcp.h
Pretty horrible merge between crypto hash consolidation
and crypto_digest_...->crypto_hash_... conversion
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.h')
-rw-r--r-- | drivers/scsi/iscsi_tcp.h | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/drivers/scsi/iscsi_tcp.h b/drivers/scsi/iscsi_tcp.h index e35701305fc9..32736831790e 100644 --- a/drivers/scsi/iscsi_tcp.h +++ b/drivers/scsi/iscsi_tcp.h | |||
@@ -31,23 +31,21 @@ | |||
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 | ||
@@ -85,9 +83,6 @@ struct iscsi_tcp_conn { | |||
85 | /* iSCSI connection-wide sequencing */ | 83 | /* iSCSI connection-wide sequencing */ |
86 | int hdr_size; /* PDU header size */ | 84 | int hdr_size; /* PDU header size */ |
87 | 85 | ||
88 | struct crypto_hash *rx_tfm; /* CRC32C (Rx) */ | ||
89 | struct hash_desc data_rx_hash; /* CRC32C (Rx) for data */ | ||
90 | |||
91 | /* control data */ | 86 | /* control data */ |
92 | struct iscsi_tcp_recv in; /* TCP receive context */ | 87 | struct iscsi_tcp_recv in; /* TCP receive context */ |
93 | int in_progress; /* connection state machine */ | 88 | int in_progress; /* connection state machine */ |
@@ -97,9 +92,9 @@ struct iscsi_tcp_conn { | |||
97 | void (*old_state_change)(struct sock *); | 92 | void (*old_state_change)(struct sock *); |
98 | void (*old_write_space)(struct sock *); | 93 | void (*old_write_space)(struct sock *); |
99 | 94 | ||
100 | /* xmit */ | 95 | /* data and header digests */ |
101 | struct crypto_hash *tx_tfm; /* CRC32C (Tx) */ | 96 | struct hash_desc tx_hash; /* CRC32C (Tx) */ |
102 | struct hash_desc data_tx_hash; /* CRC32C (Tx) for data */ | 97 | struct hash_desc rx_hash; /* CRC32C (Rx) */ |
103 | 98 | ||
104 | /* MIB custom statistics */ | 99 | /* MIB custom statistics */ |
105 | uint32_t sendpage_failures_cnt; | 100 | uint32_t sendpage_failures_cnt; |
@@ -158,19 +153,15 @@ struct iscsi_tcp_cmd_task { | |||
158 | struct scatterlist *bad_sg; /* assert statement */ | 153 | struct scatterlist *bad_sg; /* assert statement */ |
159 | int sg_count; /* SG's to process */ | 154 | int sg_count; /* SG's to process */ |
160 | uint32_t exp_r2tsn; | 155 | uint32_t exp_r2tsn; |
161 | int r2t_data_count; /* R2T Data-Out bytes */ | ||
162 | int data_offset; | 156 | int data_offset; |
163 | struct iscsi_r2t_info *r2t; /* in progress R2T */ | 157 | struct iscsi_r2t_info *r2t; /* in progress R2T */ |
164 | struct iscsi_queue r2tpool; | 158 | struct iscsi_queue r2tpool; |
165 | struct kfifo *r2tqueue; | 159 | struct kfifo *r2tqueue; |
166 | struct iscsi_r2t_info **r2ts; | 160 | struct iscsi_r2t_info **r2ts; |
167 | uint32_t datadigest; /* for recover digest */ | ||
168 | int digest_count; | 161 | int digest_count; |
169 | uint32_t immdigest; /* for imm data */ | 162 | uint32_t immdigest; /* for imm data */ |
170 | struct iscsi_buf immbuf; /* for imm data digest */ | 163 | struct iscsi_buf immbuf; /* for imm data digest */ |
171 | struct iscsi_data_task *dtask; /* data task in progress*/ | ||
172 | struct iscsi_data_task unsol_dtask; /* unsol data task */ | 164 | struct iscsi_data_task unsol_dtask; /* unsol data task */ |
173 | int digest_offset; /* for partial buff digest */ | ||
174 | }; | 165 | }; |
175 | 166 | ||
176 | #endif /* ISCSI_H */ | 167 | #endif /* ISCSI_H */ |