diff options
author | Yi Zou <yi.zou@intel.com> | 2009-02-27 17:07:15 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-13 16:14:54 -0400 |
commit | 39ca9a065a5a0a6f2f0cd648090a979ba3f4f018 (patch) | |
tree | a2557caf03d174135a6b475b1cdd87f13b49aa7e /drivers/scsi | |
parent | 276d68142b7b676594ab8739355c27e9e5b3d41d (diff) |
[SCSI] fcoe: add support to large send by gso through net_device for fcoe_sw
Change fcoe_xmit to setup gso for LLD LSO offload as well as CRC offload
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index a99a42807b38..5dae823057ae 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -423,7 +423,7 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp) | |||
423 | 423 | ||
424 | /* crc offload */ | 424 | /* crc offload */ |
425 | if (likely(lp->crc_offload)) { | 425 | if (likely(lp->crc_offload)) { |
426 | skb->ip_summed = CHECKSUM_COMPLETE; | 426 | skb->ip_summed = CHECKSUM_PARTIAL; |
427 | skb->csum_start = skb_headroom(skb); | 427 | skb->csum_start = skb_headroom(skb); |
428 | skb->csum_offset = skb->len; | 428 | skb->csum_offset = skb->len; |
429 | crc = 0; | 429 | crc = 0; |
@@ -483,6 +483,16 @@ int fcoe_xmit(struct fc_lport *lp, struct fc_frame *fp) | |||
483 | FC_FCOE_ENCAPS_VER(hp, FC_FCOE_VER); | 483 | FC_FCOE_ENCAPS_VER(hp, FC_FCOE_VER); |
484 | hp->fcoe_sof = sof; | 484 | hp->fcoe_sof = sof; |
485 | 485 | ||
486 | #ifdef NETIF_F_FSO | ||
487 | /* fcoe lso, mss is in max_payload which is non-zero for FCP data */ | ||
488 | if (lp->seq_offload && fr_max_payload(fp)) { | ||
489 | skb_shinfo(skb)->gso_type = SKB_GSO_FCOE; | ||
490 | skb_shinfo(skb)->gso_size = fr_max_payload(fp); | ||
491 | } else { | ||
492 | skb_shinfo(skb)->gso_type = 0; | ||
493 | skb_shinfo(skb)->gso_size = 0; | ||
494 | } | ||
495 | #endif | ||
486 | /* update tx stats: regardless if LLD fails */ | 496 | /* update tx stats: regardless if LLD fails */ |
487 | stats = lp->dev_stats[smp_processor_id()]; | 497 | stats = lp->dev_stats[smp_processor_id()]; |
488 | if (stats) { | 498 | if (stats) { |