From patchwork Sat Jun 30 16:18:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 140684 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2138978ljj; Sat, 30 Jun 2018 09:20:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe+jINa3iEfgU2F+PXTd1OOF00Wp1ihhjotbzhSFkyKuL7wJIyz/Fx7jK1Src93BTto5fHI X-Received: by 2002:a62:c8c2:: with SMTP id i63-v6mr3071127pfk.73.1530375655735; Sat, 30 Jun 2018 09:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530375655; cv=none; d=google.com; s=arc-20160816; b=c3KBVbjuO1CHZoUDRSliaacxHNGkzLUcAzzmu+GwCl9QmdfW6HToLrQBNwjDXZ8vBr oUatGfDZlm2757ohTjIK9FGALMPoIPCjd2S/vaz8RjaeBBRvSiFM3UXJAYmUVnAwLtGy 99QdtkkcfQwPZuobdJ/0Jp3uw4Cpm6hk1c9+FHwq/aFVsZtvrr/UybrQ7huf0oEWvKFC x8AMispAFKhw5Z/s9gQCajsHWvpDiKoGV3C69ioFlJoVNdtrFuflIUcZxmFHwwztFLQM fRqmtfF6VI5w0IIY0RZK4tN42zSaD28jZvYvtc2Zx6yjEZ7XVBImf3epEAx8n10xrN4v PBNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=CZYYZYSWvfSyxGf+31QL5nyDvXIzm3ctA/PKotM1VUU=; b=XEM92++PIpLepAEQzfxQBB1rERfeG/8WZos0v846q0O5tR206g3Y0BBgXs2/KpxUab Zua/6wNNI5yUP2WDx2y2GQ5XZMmOihZyINMVKfKZtbYeTWdqBppncMiLIVq2Q+VMHbi9 XXMq6ZlBilXq0cD2vqPI2g+wzHon4tpNHXMajvSaTwPxpNpO0eW1+rfWeRWZQsdjBrxk A51hdtrQ6NdgedzV+Go2qbGElGqIAbu2W8Ag03a9Oklo1tdbcgA4/C7q6VfKd5ydL97W r2HzCwOPHAd+zysfC5aS7Dds4d4GD6coLxNifiHRvk5acGOEap/YLreyNDgTEhaya9TV B8Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=enb6ASSV; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78-v6si12501422pfb.204.2018.06.30.09.20.55; Sat, 30 Jun 2018 09:20:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=enb6ASSV; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbeF3QUr (ORCPT + 9 others); Sat, 30 Jun 2018 12:20:47 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38717 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751460AbeF3QUk (ORCPT ); Sat, 30 Jun 2018 12:20:40 -0400 Received: by mail-lj1-f194.google.com with SMTP id v15-v6so9564151ljk.5 for ; Sat, 30 Jun 2018 09:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CZYYZYSWvfSyxGf+31QL5nyDvXIzm3ctA/PKotM1VUU=; b=enb6ASSVXOStKcjIkI+5xLQh0LS0eL3g2gtP3pXO35H51nR14vQVDuY/RQI3B+5mOl QkLedM8kul1a6Dirk3K7kSKwGmre5IXlpUu6k3W/HiQ5XfjEdsqTL1h6UB4Ih09mah89 2JiGKlV1bsWjTIDu8WQWBIzOmjCJRKhhATjpc= 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:in-reply-to :references; bh=CZYYZYSWvfSyxGf+31QL5nyDvXIzm3ctA/PKotM1VUU=; b=G0wTvdI7HTi+sOBGm9unORiTkUprgoZ97u7Uh8eeEQRJ0KGc9BDhyO3R8e3LWXnpHD d+UzH1VjNIFyPTIfszBax5uNVr8soLva77JQrRbQKRzX1jikCgyMgJXnRhYdYOLN2WaD nJyn83nYpGyhlWzz95qGHmjsrY5+rZInYI9cKNfCTK1PkRwu16tjilSmkXRSDWpw6mLG 1LgCbFpicqL7PtwNjquz2qotwYLwgFBFd/U+Mv0oiX9FpsTEtOSUAZyhh3ubEHfhTAPi zctAqhXJzzkPpwbMPM0RIhfxzH0DJ/vQiBEgxCVYK5KqY+7rrJ6QVpV/jpy3tJ5MDswj zJVg== X-Gm-Message-State: APt69E0t6W3NkDgb9qsavl0MKuDc08XQUUR1ulzVadI0f8r9ZrMZULY7 ZSo9QrhErQf8ZxDaGe2rxv6pvvFM2f4= X-Received: by 2002:a2e:1503:: with SMTP id s3-v6mr13275647ljd.65.1530375638689; Sat, 30 Jun 2018 09:20:38 -0700 (PDT) Received: from localhost.localdomain (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id 93-v6sm2271978lfy.64.2018.06.30.09.20.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Jun 2018 09:20:37 -0700 (PDT) From: Linus Walleij To: netdev@vger.kernel.org, "David S . Miller" , =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Janos Laube , Paulius Zaleckas , linux-arm-kernel@lists.infradead.org, Hans Ulli Kroll , Florian Fainelli , Linus Walleij Subject: [PATCH net-next 5/5] net: gemini: Indicate that we can handle jumboframes Date: Sat, 30 Jun 2018 18:18:06 +0200 Message-Id: <20180630161806.24312-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180630161806.24312-1-linus.walleij@linaro.org> References: <20180630161806.24312-1-linus.walleij@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The hardware supposedly handles frames up to 10236 bytes and implements .ndo_change_mtu() so accept 10236 minus the ethernet header for a VLAN tagged frame on the netdevices. Signed-off-by: Linus Walleij --- drivers/net/ethernet/cortina/gemini.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 79324bbfd768..ae475393e4ac 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -2473,6 +2473,11 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev) netdev->hw_features = GMAC_OFFLOAD_FEATURES; netdev->features |= GMAC_OFFLOAD_FEATURES | NETIF_F_GRO; + /* We can handle jumbo frames up to 10236 bytes so, let's accept + * payloads of 10236 bytes minus VLAN and ethernet header + */ + netdev->min_mtu = 256; + netdev->max_mtu = 10236 - VLAN_ETH_HLEN; port->freeq_refill = 0; netif_napi_add(netdev, &port->napi, gmac_napi_poll,