diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2008-12-02 01:32:16 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:23 -0500 |
commit | 6df19a791bdd5d820cccd8c7a12679888ae62099 (patch) | |
tree | 5afebc101c362d0a41275337dced617fb06f8a89 /drivers/scsi/iscsi_tcp.c | |
parent | ae15f80172d95f978b60d40408353943d5bc099b (diff) |
[SCSI] libiscsi_tcp: support padding offload
cxgb3i does not offload the processing of the header,
but it will always process the padding. This patch
adds a padding offload flag to detect when the LLD
supports this.
The patch also modifies the header processing so that
we do not try to read/bypass the header dugest in the
skb. cxgb3i will not include it with the header like
with other offload cards.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index de5c9b3e51fb..23808dfe22ba 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -194,7 +194,7 @@ iscsi_sw_tcp_conn_restore_callbacks(struct iscsi_sw_tcp_conn *tcp_sw_conn) | |||
194 | 194 | ||
195 | /** | 195 | /** |
196 | * iscsi_sw_tcp_xmit_segment - transmit segment | 196 | * iscsi_sw_tcp_xmit_segment - transmit segment |
197 | * @tcp_sw_conn: the iSCSI TCP connection | 197 | * @tcp_conn: the iSCSI TCP connection |
198 | * @segment: the buffer to transmnit | 198 | * @segment: the buffer to transmnit |
199 | * | 199 | * |
200 | * This function transmits as much of the buffer as | 200 | * This function transmits as much of the buffer as |
@@ -205,14 +205,15 @@ iscsi_sw_tcp_conn_restore_callbacks(struct iscsi_sw_tcp_conn *tcp_sw_conn) | |||
205 | * hash as it goes. When the entire segment has been transmitted, | 205 | * hash as it goes. When the entire segment has been transmitted, |
206 | * it will retrieve the hash value and send it as well. | 206 | * it will retrieve the hash value and send it as well. |
207 | */ | 207 | */ |
208 | static int iscsi_sw_tcp_xmit_segment(struct iscsi_sw_tcp_conn *tcp_sw_conn, | 208 | static int iscsi_sw_tcp_xmit_segment(struct iscsi_tcp_conn *tcp_conn, |
209 | struct iscsi_segment *segment) | 209 | struct iscsi_segment *segment) |
210 | { | 210 | { |
211 | struct iscsi_sw_tcp_conn *tcp_sw_conn = tcp_conn->dd_data; | ||
211 | struct socket *sk = tcp_sw_conn->sock; | 212 | struct socket *sk = tcp_sw_conn->sock; |
212 | unsigned int copied = 0; | 213 | unsigned int copied = 0; |
213 | int r = 0; | 214 | int r = 0; |
214 | 215 | ||
215 | while (!iscsi_tcp_segment_done(segment, 0, r)) { | 216 | while (!iscsi_tcp_segment_done(tcp_conn, segment, 0, r)) { |
216 | struct scatterlist *sg; | 217 | struct scatterlist *sg; |
217 | unsigned int offset, copy; | 218 | unsigned int offset, copy; |
218 | int flags = 0; | 219 | int flags = 0; |
@@ -263,7 +264,7 @@ static int iscsi_sw_tcp_xmit(struct iscsi_conn *conn) | |||
263 | int rc = 0; | 264 | int rc = 0; |
264 | 265 | ||
265 | while (1) { | 266 | while (1) { |
266 | rc = iscsi_sw_tcp_xmit_segment(tcp_sw_conn, segment); | 267 | rc = iscsi_sw_tcp_xmit_segment(tcp_conn, segment); |
267 | if (rc < 0) { | 268 | if (rc < 0) { |
268 | rc = ISCSI_ERR_XMIT_FAILED; | 269 | rc = ISCSI_ERR_XMIT_FAILED; |
269 | goto error; | 270 | goto error; |