diff options
author | Karen Xie | 2009-02-14 06:38:54 +0100 |
---|---|---|
committer | James Bottomley | 2009-02-22 03:29:37 +0100 |
commit | f62d0896e67195d4407ef81c6f77a92f72a63e88 (patch) | |
tree | 3b305f041b9ae2c569bce4ac410e8e655b72d7fd /drivers/scsi/cxgb3i/cxgb3i_offload.h | |
parent | [SCSI] cxgb3i: added per-task data to track transmit progress (diff) | |
download | kernel-qcow2-linux-f62d0896e67195d4407ef81c6f77a92f72a63e88.tar.gz kernel-qcow2-linux-f62d0896e67195d4407ef81c6f77a92f72a63e88.tar.xz kernel-qcow2-linux-f62d0896e67195d4407ef81c6f77a92f72a63e88.zip |
[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 { /* for TX: a skb must have a headroom of at least TX_HEADER_LEN bytes */ #define TX_HEADER_LEN \ (sizeof(struct tx_data_wr) + sizeof(struct sge_opaque_hdr)) +#define SKB_TX_HEADROOM SKB_MAX_HEAD(TX_HEADER_LEN) /* * get and set private ip for iscsi traffic |