From patchwork Sun May 6 20:01:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Greb X-Patchwork-Id: 10382981 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 331AA60353 for ; Sun, 6 May 2018 20:02:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 138CD28A87 for ; Sun, 6 May 2018 20:02:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0821628A9D; Sun, 6 May 2018 20:02:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94CD428A87 for ; Sun, 6 May 2018 20:02:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbeEFUCO (ORCPT ); Sun, 6 May 2018 16:02:14 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:39893 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751841AbeEFUCN (ORCPT ); Sun, 6 May 2018 16:02:13 -0400 Received: by mail-lf0-f68.google.com with SMTP id j193-v6so37647607lfg.6 for ; Sun, 06 May 2018 13:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=5M1+urXvAgWOFu5YyHP+XgpNzwATc2xTAt1Yt4YbgYY=; b=hPs8uVqzRa5TKb4wMs4Y9cvm2vbAAnePH1FrbJQkfXnk9v6J2Bl+GG5XnD5RrK9rLe cqgBM8M13aOZFMH9RbAezDxYkoSlGK6U0J9YjDbzIsb0Z9vxVjuIfqf5HSzkSQ2+OxIZ Md9RCYrCB/q6DQ7n4v1zyaOWqpDIMsuNC7BWsDu/zkyBl5iIDXkpmqF3OkEI9j2IPTy5 cf5w1MnPH6dobBQFWPvRsRSNnhVESwHeINLBi/oCtjTjtyyFYBEEyt2vH8rGahcnEKNB HojV1HhX4HYpquGu5qdPSmCnFEZrvSc+tC72HRGyvyGkl/dC6XLNhmFV1YhrMYd1LY3d rHnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5M1+urXvAgWOFu5YyHP+XgpNzwATc2xTAt1Yt4YbgYY=; b=EJOZDv+D8EIhscIrr6qybbCHaJ7LzJvP5n6P3/Hi7pwDj4ZndmPG/QL9btZl5dY9Qq gg568JFRO8QLr56Qekq8QQbw9qHoegJlF9nPsP5YmpCtoXjH/dDHGK4xs2Bvk4W9fbyT VfJ2pesMTRJr/IneLWNI+QHVtA1G6DHlEkAWQx1GBV4IAf0S1ZB8IYqQKf2+cpH3harI cqxQRlA5XNsscX062oNWSLD1aldxtiCj7g3B0u7iDwlueHEZA3s04ElP/77kWBrwUS6r Mn+IEUJ/bicMKtnfGZHMwlPkL2FWowa7occUv2qAL2rgoqJaOgiu+xjGce+xl8Fhgoxg UWTg== X-Gm-Message-State: ALQs6tB8/nu5kUaegntHr2RgFM/lhRVu5XQlk4ScH+r0Ygnt1/lhAXg4 CQ4h9gGDmbV3w6kKmvTGNmM= X-Google-Smtp-Source: AB8JxZraQ/DTDvGbDYo1nLdp+k5UHm8nEZTmuWHsQDjk2jwEXKNmh3zzETlujco2BsYDc73v/nrvbw== X-Received: by 2002:a19:3848:: with SMTP id d8-v6mr20015525lfj.16.1525636932428; Sun, 06 May 2018 13:02:12 -0700 (PDT) Received: from steambox.greyskull ([2.30.76.11]) by smtp.googlemail.com with ESMTPSA id r78-v6sm3744954ljb.20.2018.05.06.13.02.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 May 2018 13:02:11 -0700 (PDT) From: John Greb To: net@karikoa.uk Cc: linux-usb@vger.kernel.org, balbi@kernel.org, jarod@redhat.com, John Greb Subject: [PATCH] USB: Gadget Ethernet: Re-enable Jumbo frames. Date: Sun, 6 May 2018 20:01:57 +0000 Message-Id: <1525636918-15810-1-git-send-email-h3x4m3r0n@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes: ("net: use core MTU range checking") which patched only one of two functions used to setup the USB Gadget Ethernet driver, causing a serious performance regression in the ability to increase mtu size above 1500. Signed-off-by: John Greb --- drivers/usb/gadget/function/u_ether.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 6fcda62..1000d86 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c @@ -844,6 +844,10 @@ struct net_device *gether_setup_name_default(const char *netname) net->ethtool_ops = &ops; SET_NETDEV_DEVTYPE(net, &gadget_type); + /* MTU range: 14 - 15412 */ + net->min_mtu = ETH_HLEN; + net->max_mtu = GETHER_MAX_ETH_FRAME_LEN; + return net; } EXPORT_SYMBOL_GPL(gether_setup_name_default);