Commit cf64bc8f authored by Yi Zou's avatar Yi Zou Committed by David S. Miller

fcoe: use CHECKSUM_UNNECESSARY instead of CHECKSUM_PARTIAL on tx

Fix a bug when using 'ethtool -K ethx tx off' to turn off tx ip checksum,
FCoE CRC offload should not be impacte. The skb_checksum_help() is needed
only if it's not FCoE traffic for ip checksum, regardless of ethtool toggling
the tx ip checksum on or off. Instead of using CHECKSUM_PARTIAL, we will
use CHECKSUM_UNNECESSARY as a proper indication to avoid sw ip checksum
on FCoE frames.

Ref. to original discussion thread:
http://patchwork.ozlabs.org/patch/146567/

CC: "James E.J. Bottomley" <JBottomley@parallels.com>
CC: Robert Love <robert.w.love@intel.com>
Signed-off-by: default avatarYi Zou <yi.zou@intel.com>
Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cdbee74c
...@@ -1498,7 +1498,7 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) ...@@ -1498,7 +1498,7 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
/* crc offload */ /* crc offload */
if (likely(lport->crc_offload)) { if (likely(lport->crc_offload)) {
skb->ip_summed = CHECKSUM_PARTIAL; skb->ip_summed = CHECKSUM_UNNECESSARY;
skb->csum_start = skb_headroom(skb); skb->csum_start = skb_headroom(skb);
skb->csum_offset = skb->len; skb->csum_offset = skb->len;
crc = 0; crc = 0;
......
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