aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zou <yi.zou@intel.com>2012-03-16 23:08:11 +0000
committerDavid S. Miller <davem@davemloft.net>2012-03-19 17:37:35 -0400
commitcdbee74ce74cd66de42a6f6d0edfa74fa9a66f2a (patch)
treea474de30581af399a5024dd69bfa67dced47b8c5
parentixgbe: Fix issues with SR-IOV loopback when flow control is disabled (diff)
downloadlinux-dev-cdbee74ce74cd66de42a6f6d0edfa74fa9a66f2a.tar.xz
linux-dev-cdbee74ce74cd66de42a6f6d0edfa74fa9a66f2a.zip
net: do not do gso for CHECKSUM_UNNECESSARY in netif_needs_gso
This is related to fixing the bug of dropping FCoE frames when disabling tx ip checksum by 'ethtool -K ethx tx off'. The FCoE protocol stack driver would use CHECKSUM_UNNECESSARY on tx path instead of CHECKSUM_PARTIAL (as indicated in the 2/2 of this series). To do so, netif_needs_gso() has to be changed here to not do gso for both CHECKSUM_PARTIAL and CHECKSUM_UNNECESSARY. Ref. to original discussion thread: http://patchwork.ozlabs.org/patch/146567/ Signed-off-by: Yi Zou <yi.zou@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netdevice.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4535a4ea9760..261067b94559 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2657,7 +2657,8 @@ static inline bool netif_needs_gso(struct sk_buff *skb,
netdev_features_t features)
{
return skb_is_gso(skb) && (!skb_gso_ok(skb, features) ||
- unlikely(skb->ip_summed != CHECKSUM_PARTIAL));
+ unlikely((skb->ip_summed != CHECKSUM_PARTIAL) &&
+ (skb->ip_summed != CHECKSUM_UNNECESSARY)));
}
static inline void netif_set_gso_max_size(struct net_device *dev,