Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1705670ybt; Thu, 9 Jul 2020 13:25:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDwyRG9jtSTjrcBG+5Qxjz58WOf+nZTplNHfRNTiwZlTo1vY7RAtl3ZikwabSlmS81BaWX X-Received: by 2002:a50:d7c1:: with SMTP id m1mr75167516edj.217.1594326338882; Thu, 09 Jul 2020 13:25:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594326338; cv=none; d=google.com; s=arc-20160816; b=JpeNDXr85KcdGQt9rVb45y6jGhA4vD4Yy+aUQyozrsq/6zLItYC58ka2AM9B21i5Or f3uwXT97MZ0pqNTbLLfEqhLp2sMzWRKXymfeiMNj2ZZvluk58ZvJrAMuVHywhgLd0J28 Irn/9kcPznSsFZ8/syv6adPUbliryfnfVe9U/ueeoI1dScHjmlu9RYOzMS3QdckBXJUH rYxqcwXll9UuG4pABbpfga0MG08H4tNbNy3/bo4jRLnn7rNcUxI9pUm2OCM++9dpPUUO WhZbvkibuol5CZPkEXhzwZ1a6iqLyebvpxjjqtmzzc43Csc77unD4jbdot6dOrr5enti YVuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=GRNxWbeIZlfB+wYO0DeDlHd8sRwlYS51JdHYq5n4hzo=; b=EQYksLhDx8Wca/LLF8prCzEjur0mtoeMDNTec9139ryu6HwOWW2To0IKKXnPv4/WNz 5eJvoqLsGzm69QFMJLV6sOQ0Le6agIzVMuZ5Rar/n/QAdkhaBXEzpd5Jxp3awILGbjZZ xq5e/Lbfxbv84VQz6G51LCNZ6S0Nk+htaOmVHIZPnXViqml61pBFPDR9XaYJEA+XXv6+ hqlfwdjh9Mv6Z61XhK/G0P6XcdXEvdGQZrltPpZinnpe62Uf2orYcM7fWP2FNll82+wi j1p6RRgefrqXO08999YWboiqhvwyrjBsMhZry3SiB5JU2cfr1RJU5Udjdrkc9fcrYtiO MGeA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o12si2558976ejh.340.2020.07.09.13.25.14; Thu, 09 Jul 2020 13:25:38 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbgGIUWs (ORCPT + 99 others); Thu, 9 Jul 2020 16:22:48 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:55946 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbgGIUWr (ORCPT ); Thu, 9 Jul 2020 16:22:47 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jtd3z-004NLP-BI; Thu, 09 Jul 2020 22:22:35 +0200 Date: Thu, 9 Jul 2020 22:22:35 +0200 From: Andrew Lunn To: Frank Wunderlich Cc: linux-mediatek@lists.infradead.org, =?iso-8859-1?Q?Ren=E9?= van Dorst , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Jakub Kicinski , Matthias Brugger , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Landen Chao Subject: Re: Re: [PATCH v2] net: ethernet: mtk_eth_soc: fix mtu warning Message-ID: <20200709202235.GB1037260@lunn.ch> References: <20200709055742.3425-1-frank-w@public-files.de> <20200709134115.GK928075@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 09:48:01PM +0200, Frank Wunderlich wrote: > > Gesendet: Donnerstag, 09. Juli 2020 um 15:41 Uhr > > Von: "Andrew Lunn" > > > > + 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. > > i tried setting only the max_mtu, but the dsa-error is still present > > mt7530 mdio-bus:00: nonfatal error -95 setting MTU on port 0 > > but i got it too, if i revert the change...mhm, strange that these were absent last time... > > the other 2 are fixed with only max_mtu. > @andrew where did you got the 2k-64 (=1984) information? sounds like orwell ;) drivers/net/ethernet/freescale/fec_main.c: /* The FEC stores dest/src/type/vlan, data, and checksum for receive packets. * * 2048 byte skbufs are allocated. However, alignment requirements * varies between FEC variants. Worst case is 64, so round down by 64. */ #define PKT_MAXBUF_SIZE (round_down(2048 - 64, 64)) So i set the max MTU to this. > 1405 static int dsa_slave_change_mtu(struct net_device *dev, int new_mtu) > ... > 1420 if (!ds->ops->port_change_mtu) > 1421 return -EOPNOTSUPP; Yes, i also needed to change the mv88e6xxx driver to implement this function. These switches do support jumbo frames, so i had some real code in there, not a dummy function. The marketing brief for the mt7530 says it supports 1518, 1536, 1552 and 9K jumbo frames. It would be good if you can figure out how to support that, rather than add a dummy function. Andrew