Commit 276d6814 authored by Yi Zou's avatar Yi Zou Committed by James Bottomley

[SCSI] libfc: use lso_max for sequence offload

Make sure for large send is supported by LLD in outgoing FCP data, we are only
sending the lso_max a time in one single large send, since that is what
supported by LLD.
Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent ea1e9a9d
...@@ -435,7 +435,13 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq, ...@@ -435,7 +435,13 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq,
* burst length (t_blen) to seq_blen, otherwise set t_blen * burst length (t_blen) to seq_blen, otherwise set t_blen
* to max FC frame payload previously set in fsp->max_payload. * to max FC frame payload previously set in fsp->max_payload.
*/ */
t_blen = lp->seq_offload ? seq_blen : fsp->max_payload; t_blen = fsp->max_payload;
if (lp->seq_offload) {
t_blen = min(seq_blen, (size_t)lp->lso_max);
FC_DEBUG_FCP("fsp=%p:lso:blen=%zx lso_max=0x%x t_blen=%zx\n",
fsp, seq_blen, lp->lso_max, t_blen);
}
WARN_ON(t_blen < FC_MIN_MAX_PAYLOAD); WARN_ON(t_blen < FC_MIN_MAX_PAYLOAD);
if (t_blen > 512) if (t_blen > 512)
t_blen &= ~(512 - 1); /* round down to block size */ t_blen &= ~(512 - 1); /* round down to block size */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment