netvsc: reduce maximum GSO size
commit a50af86dd49ee1851d1ccf06dd0019c05b95e297 upstream. 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: Willy Tarreau <w@1wt.eu>
This commit is contained in:
committed by
Willy Tarreau
parent
468316bf28
commit
437529843f
@@ -48,6 +48,9 @@ struct net_device_context {
|
||||
struct work_struct work;
|
||||
};
|
||||
|
||||
/* Restrict GSO size to account for NVGRE */
|
||||
#define NETVSC_GSO_MAX_SIZE 62768
|
||||
|
||||
#define RING_SIZE_MIN 64
|
||||
static int ring_size = 128;
|
||||
module_param(ring_size, int, S_IRUGO);
|
||||
@@ -436,6 +439,7 @@ static int netvsc_probe(struct hv_device *dev,
|
||||
|
||||
SET_ETHTOOL_OPS(net, ðtool_ops);
|
||||
SET_NETDEV_DEV(net, &dev->device);
|
||||
netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
|
||||
|
||||
ret = register_netdev(net);
|
||||
if (ret != 0) {
|
||||
|
||||
Reference in New Issue
Block a user