]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/linux/0015-hyperv-Properly-handle-checksum-offload.patch
util-linux: update rootfile (armv5tel)
[ipfire-2.x.git] / src / patches / linux / 0015-hyperv-Properly-handle-checksum-offload.patch
CommitLineData
a7b0967d
MT
1From 540360773bad2b81f14c38ca92b62797fa32cbc6 Mon Sep 17 00:00:00 2001
2From: KY Srinivasan <kys@microsoft.com>
3Date: Wed, 30 Apr 2014 11:58:25 -0700
4Subject: [PATCH 15/25] hyperv: Properly handle checksum offload
5
6Do checksum offload only if the client of the driver wants checksum to be
7offloaded.
8
9In V1 version of this patch, I addressed comments from
10Stephen Hemminger <stephen@networkplumber.org> and
11Eric Dumazet <eric.dumazet@gmail.com>.
12
13In this version of the patch I have addressed comments from
14David Miller.
15
16This patch fixes a bug that is exposed in gateway scenarios.
17
18Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
19Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21---
22 drivers/net/hyperv/netvsc_drv.c | 4 ++++
23 1 file changed, 4 insertions(+)
24
25diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
26index 0d898876689e..ce6d870dd7ae 100644
27--- a/drivers/net/hyperv/netvsc_drv.c
28+++ b/drivers/net/hyperv/netvsc_drv.c
29@@ -383,6 +383,10 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
30 if (skb_is_gso(skb))
31 goto do_lso;
32
33+ if ((skb->ip_summed == CHECKSUM_NONE) ||
34+ (skb->ip_summed == CHECKSUM_UNNECESSARY))
35+ goto do_send;
36+
37 rndis_msg_size += NDIS_CSUM_PPI_SIZE;
38 ppi = init_ppi_data(rndis_msg, NDIS_CSUM_PPI_SIZE,
39 TCPIP_CHKSUM_PKTINFO);
40--
412.4.3
42