Re: [PATCH 4.4 01/27] netvsc: reduce maximum GSO size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2017-01-13 at 12:38 +0100, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: stephen hemminger <stephen@xxxxxxxxxxxxxxxxxx>
> 
> 
> [ 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@xxxxxxxxxxxxx>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/net/hyperv/netvsc_drv.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- 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 ne
>  		}
>  		goto recover;
>  	}
> +	netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
>  
>   out:
>  	netvsc_open(net);
> 

This has been wrongly backported.  Please apply the patch below.

Ben.

---
From: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Date: Thu, 9 Feb 2017 19:32:08 +0000
Subject: [PATCH] netvsc: Set maximum GSO size in the right place

Commit a50af86dd49e "netvsc: reduce maximum GSO size" was wrongly
backported to 4.4-stable.  The maximum size needs to be set before the
net device is registered, in netvsc_probe().

Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 7a601d8c615e..e8a09ff9e724 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -854,7 +854,6 @@ 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);
@@ -1142,6 +1141,7 @@ static int netvsc_probe(struct hv_device *dev,
 	nvdev = hv_get_drvdata(dev);
 	netif_set_real_num_tx_queues(net, nvdev->num_chn);
 	netif_set_real_num_rx_queues(net, nvdev->num_chn);
+	netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);
 
 	ret = register_netdev(net);
 	if (ret != 0) {

-- 
Ben Hutchings
All the simple programs have been written, and all the good names
taken.

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]