lkml.org 
[lkml]   [2017]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.2 179/199] netvsc: reduce maximum GSO size
    3.2.87-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: stephen hemminger <stephen@networkplumber.org>

    [ 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>
    [bwh: Backported to 3.2: adjust filename, context]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    drivers/staging/hv/netvsc_drv.c | 3 +++
    1 file changed, 3 insertions(+)

    --- a/drivers/staging/hv/netvsc_drv.c
    +++ b/drivers/staging/hv/netvsc_drv.c
    @@ -52,6 +52,9 @@ struct net_device_context {
    /* Need this many pages to handle worst case fragmented packet */
    #define PACKET_PAGES_HIWATER (MAX_SKB_FRAGS + 2)

    +/* Restrict GSO size to account for NVGRE */
    +#define NETVSC_GSO_MAX_SIZE 62768
    +
    static int ring_size = 128;
    module_param(ring_size, int, S_IRUGO);
    MODULE_PARM_DESC(ring_size, "Ring buffer size (# of pages)");
    @@ -363,6 +366,7 @@ static int netvsc_probe(struct hv_device

    SET_ETHTOOL_OPS(net, &ethtool_ops);
    SET_NETDEV_DEV(net, &dev->device);
    + netif_set_gso_max_size(net, NETVSC_GSO_MAX_SIZE);

    ret = register_netdev(net);
    if (ret != 0) {
    \
     
     \ /
      Last update: 2017-03-10 12:58    [W:4.069 / U:0.636 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site