aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2016-12-06 13:43:54 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-15 13:41:34 +0100
commit33c7b0f74c57d1a3c0a623ce794d7f61e097d09c (patch)
treeb00d8360384a65ecb8aee8bd6fbd6b3f9eabd99f /drivers/net
parent49c4446a2e13b3e4ff2d953ca8e2d961964d0351 (diff)
downloadlinux-linaro-stable-33c7b0f74c57d1a3c0a623ce794d7f61e097d09c.tar.gz
netvsc: reduce maximum GSO size
[ Upstream commit a50af86dd49ee1851d1ccf06dd0019c05b95e297 ] Hyper-V (and Azure) support using NVGRE which requires some extra space for encapsulation headers. Because of this the largest allowed TSO packet is reduced. For older releases, hard code a fixed reduced value. For next release, there is a better solution which uses result of host offload negotiation. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/hyperv/netvsc_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 409b48e1e589..7a601d8c615e 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -40,6 +40,8 @@
#include "hyperv_net.h"
+/* Restrict GSO size to account for NVGRE */
+#define NETVSC_GSO_MAX_SIZE 62768
#define RING_SIZE_MIN 64
static int ring_size = 128;
@@ -852,6 +854,7 @@ static int netvsc_set_channels(struct net_device *net,
}
goto recover;
}
+ netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
out:
netvsc_open(net);