Commit 33c7b0f7 authored by stephen hemminger's avatar stephen hemminger Committed by Greg Kroah-Hartman

netvsc: reduce maximum GSO size

[ Upstream commit a50af86d ]

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: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 49c4446a
......@@ -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);
......
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