Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1709275ybt; Thu, 9 Jul 2020 13:32:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqwIIBwTh3Ohct5VBlWJ6BnPq6Wt4Wk1HRTzTc3eGr4NPdZnQR75gYro1cE4XBEUeNefVf X-Received: by 2002:a05:6402:1766:: with SMTP id da6mr71611866edb.48.1594326736738; Thu, 09 Jul 2020 13:32:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594326736; cv=none; d=google.com; s=arc-20160816; b=w0z8OIMWAZ83WdqXdYP4tMBtsDECrQ3zr7YaVON7yO3tBg3uFK8Xp5WYfR/RJ7Ggcd eS48PUYroca99HMNwleVdWeDqJ+eVyezAp6zI7uRNfttkwNsHLKh10esuGBCKU3W7XFl MFLDROJGsLKMFjnnS9WsbORdYVbTJe15ShNrQImNNz4r9T/u1IC+/Sq7OQltcbW9hWZF cScxOVMiPgu6EwAoWWhHo4TqUEoFPzT6GJtixx9pb2theS6+ItpH1i1Y0DcL90VpkblK aMa7ZkpfW6A0GqXF9vXiYvbzbTrz9k0Q2fED11+tIbssq6OQqlwjoMBufFu6pxC5+hm6 /6Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Koqd6kCw0kFF9cQ+B8QeO0El7U/kaG6Z8/n9tod5TOg=; b=fcaNwJLAywsHJqv9tQ8Fo8u0uTBtiELC56O3rhh7+5lvEP3myDjyInP8fJdbZj25FP ufDrU6UrfEum/7KNCj2LhrFp+wbCs3mRWmKwvfb5CHPnNMLcQGbPzC/FM+qeKfOGfgCW G1I9IZW4XHcZQe139EscTaNyd3yZqdVxhCM6tCkcIybi/efJTg2DeKzvGXsu2FtzI1W3 bDsABwM5DLK+sshPkNZ7ZzDA8gCtHUHeDG1AbK5yatRgByhyoHrcWwSodUxKW4lWakR9 RrBiuYeKFDmV8ftNqEUqmbcItL7Ms5aq8PU5T/+VHA7++tq98cfRoKoa3HI3EqVYntZO OKcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=IvgeTeN2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss20si2441627ejb.700.2020.07.09.13.31.53; Thu, 09 Jul 2020 13:32:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=IvgeTeN2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726311AbgGIUbm (ORCPT + 99 others); Thu, 9 Jul 2020 16:31:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbgGIUbm (ORCPT ); Thu, 9 Jul 2020 16:31:42 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C471DC08C5CE; Thu, 9 Jul 2020 13:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Koqd6kCw0kFF9cQ+B8QeO0El7U/kaG6Z8/n9tod5TOg=; b=IvgeTeN2x0f/Xu41dh0Jtt43E ab7TM2+A2KH+t+kIXz6OB22IIg/CDFop78jPS70LfusrdJQfLrVK4K42mg+fqKmbW0T9VqwasG526 BC/ZzctqVt3zMj2EJCYZLtw6PUoA2ip4gRkjBxil/FBOrz0Rm3UI7HhzuJzGm8sqItDWz8L1/6jIz Jgt8Wh5eSbPHuNaLc0Yz1Uov0lIcnS5XcJMEZSVfozmjzoRi9rLN3XRX20ttGRmC/Skh7UMtA3Ndv 81gTPavt8z8Eokby2ne6SXDkBRjmNPYNAtgRCbmF8Yy7fSdvprCxMKclacB/Zqx2WT7uMZvaOZRm7 cH2Ipjsyg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:37450) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtdCj-0000xj-W6; Thu, 09 Jul 2020 21:31:38 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jtdCg-0002Xp-Gd; Thu, 09 Jul 2020 21:31:34 +0100 Date: Thu, 9 Jul 2020 21:31:34 +0100 From: Russell King - ARM Linux admin To: Andrew Lunn Cc: Frank Wunderlich , netdev@vger.kernel.org, Sean Wang , linux-kernel@vger.kernel.org, "David S. Miller" , =?iso-8859-1?Q?Ren=E9?= van Dorst , linux-mediatek@lists.infradead.org, John Crispin , Matthias Brugger , Jakub Kicinski , Mark Lee , linux-arm-kernel@lists.infradead.org, Felix Fietkau Subject: Re: [PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning Message-ID: <20200709203134.GI1551@shell.armlinux.org.uk> References: <20200709055742.3425-1-frank-w@public-files.de> <20200709134115.GK928075@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200709134115.GK928075@lunn.ch> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 09, 2020 at 03:41:15PM +0200, Andrew Lunn wrote: > On Thu, Jul 09, 2020 at 07:57:42AM +0200, Frank Wunderlich wrote: > > From: Ren? van Dorst > > > > in recent Kernel-Versions there are warnings about incorrect MTU-Size > > like these: > > > > mt7530 mdio-bus:00: nonfatal error -95 setting MTU on port x > > eth0: mtu greater than device maximum > > mtk_soc_eth 1b100000.ethernet eth0: error -22 setting MTU to include DSA overhead > > > > Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports") > > Fixes: 72579e14a1d3 ("net: dsa: don't fail to probe if we couldn't set the MTU") > > Fixes: 7a4c53bee332 ("net: report invalid mtu value via netlink extack") > > Signed-off-by: Ren? van Dorst > > Signed-off-by: Frank Wunderlich > > --- > > changes in v2: > > Fixes: tag show 12-chars of sha1 and moved above other tags > > --- > > drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > > index 85735d32ecb0..00e3d70f7d07 100644 > > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c > > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c > > @@ -2891,6 +2891,10 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) > > eth->netdev[id]->irq = eth->irq[0]; > > eth->netdev[id]->dev.of_node = np; > > > > + eth->netdev[id]->mtu = 1536; > > Hi Frank > > Don't change to MTU from the default. Anybody using this interface for > non-DSA traffic expects the default MTU. DSA will change it as needed. > > > + eth->netdev[id]->min_mtu = ETH_MIN_MTU; > > No need to set the minimum. ether_setup() will initialize it. > > > + eth->netdev[id]->max_mtu = 1536; > > I assume this is enough to make the DSA warning go away, but it is the > true max? I have a similar patch for the FEC driver which i should > post sometime. Reviewing the FEC code and after some testing, i found > the real max was 2K - 64. Are there any plans to solve these warnings for Marvell 88e6xxx DSA ports? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!