From: t_jeang Date: Tue, 6 Jan 2009 12:06:02 +0000 (+0000) Subject: Ensure that packet csums are computed correctly when sending a GSO X-Git-Tag: netback-increase-pullup X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a90b2b155218d3ad21732fd6b0ec463506f1727d;p=xenclient%2Fkernel.git Ensure that packet csums are computed correctly when sending a GSO packet to an interface which supports scatter-gather but not transmit checksum offloads. Signed-off-by: Steven Smith --- diff --git a/net/core/dev.c b/net/core/dev.c index 82d94393..dc304209 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1369,6 +1369,18 @@ gso: skb->next = nskb->next; nskb->next = NULL; + + if (nskb->ip_summed == CHECKSUM_HW && + (!(dev->features & NETIF_F_GEN_CSUM) && + (!(dev->features & NETIF_F_IP_CSUM) || + nskb->protocol != htons(ETH_P_IP)))) { + if (skb_checksum_help(nskb, 0)) { + nskb->next = skb->next; + skb->next = nskb; + return NETDEV_TX_BUSY; + } + } + rc = dev->hard_start_xmit(nskb, dev); if (unlikely(rc)) { nskb->next = skb->next;