diff options
author | Karen Xie <kxie@chelsio.com> | 2009-02-14 00:38:54 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-02-21 21:29:37 -0500 |
commit | f62d0896e67195d4407ef81c6f77a92f72a63e88 (patch) | |
tree | 3b305f041b9ae2c569bce4ac410e8e655b72d7fd /drivers/scsi/cxgb3i/cxgb3i_offload.h | |
parent | 949847d195d2bb86f61c289a57edb9207c4a3bbf (diff) |
[SCSI] cxgb3i: Outgoing pdus need to observe skb's MAX_SKB_FRAGS
Need to make sure the outgoing pdu can fit into a single skb. When
calulating the max. outgoing pdu payload size, take into consideration
of
- data can be held in the skb's fragment list, assume 512 bytes per
fragment, and
- data can be held in the headroom.
Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/cxgb3i/cxgb3i_offload.h')
-rw-r--r-- | drivers/scsi/cxgb3i/cxgb3i_offload.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/cxgb3i/cxgb3i_offload.h b/drivers/scsi/cxgb3i/cxgb3i_offload.h index df1eae0ee4be..6344b9eb2589 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_offload.h +++ b/drivers/scsi/cxgb3i/cxgb3i_offload.h | |||
@@ -225,6 +225,7 @@ struct sge_opaque_hdr { | |||
225 | /* for TX: a skb must have a headroom of at least TX_HEADER_LEN bytes */ | 225 | /* for TX: a skb must have a headroom of at least TX_HEADER_LEN bytes */ |
226 | #define TX_HEADER_LEN \ | 226 | #define TX_HEADER_LEN \ |
227 | (sizeof(struct tx_data_wr) + sizeof(struct sge_opaque_hdr)) | 227 | (sizeof(struct tx_data_wr) + sizeof(struct sge_opaque_hdr)) |
228 | #define SKB_TX_HEADROOM SKB_MAX_HEAD(TX_HEADER_LEN) | ||
228 | 229 | ||
229 | /* | 230 | /* |
230 | * get and set private ip for iscsi traffic | 231 | * get and set private ip for iscsi traffic |