Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp919358rwb; Fri, 13 Jan 2023 05:56:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXttkZTn64Cz33rBqoWxNRjpjUMIgARPJz/8Uxn1pOl91hcsyJ8+4F5d7ZrolSTtYl0ZUr8Z X-Received: by 2002:a05:6402:48c:b0:483:d49f:e26c with SMTP id k12-20020a056402048c00b00483d49fe26cmr60465786edv.15.1673618212395; Fri, 13 Jan 2023 05:56:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673618212; cv=none; d=google.com; s=arc-20160816; b=lQkWjYBF3IW+HTx6WXsyKexYiNTi+j25Zo05JO/qWC5fHugUsS7DHYAx6Ryem8zN78 nF3zkTl4wflyb4dBf4A5m6lsfsYVjG/zLdieidJKcE0vtcoyUgrOp+URjHCW10myNHzq /VakMsb5w3C1AhW2F7PWnWXT8+oijma6NTld0NXccUAGE1Sx8gh3lbcHdXg54XHijAAZ ja8jhhUHaCKELyDIjuftsCGe3nMf7pq1Y9m7/cZIMyHygX3OczTCHV0YvtGjWk85vwHs 0moRBB7FdRCHy/afgOp4DtUOB31FtufK+/TLSPQ9iMkY5t82iOI88swY9nq6bQAnpqva /Uww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:organization:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=1qSwriZFPF+/gR3HQS3JEWuiTAkSalzYficrKXK36/o=; b=FkQUwXUNOdas1NcmEo3Htv6dSjA4ZasC27G01ams8Hxkso2S6avU4h16GRRa8reF+b 3cKpm+V7CSk3ZGq0QmcGl0/lus/Z9iD8WCTeZPWzGNIuRkWTG10jqDl2YsXEeUOx/H5u JFf0xYYPuIPpRDSbiE5Bsne07kuiWIwqZfvwm4zsI05Xp5MlX661u3LN46Ybh1v70N0T A/y4E/KpDiwXkagpqBqI0LJVo48NypU/S6Gnon7oNpKbaL/hlIAhNGJiOS2aPf/hYtxh l22ApQIRFlPnzuAQbfqVkkf2xGCGsDZVcuR/0P31Dm1NU5FII2a5cIcOtNoN+Ffe2/zc ogXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=SSFFxxBD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y9-20020a056402440900b00489644e8bd0si26484235eda.610.2023.01.13.05.56.40; Fri, 13 Jan 2023 05:56:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=SSFFxxBD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240122AbjAMN3O (ORCPT + 51 others); Fri, 13 Jan 2023 08:29:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241346AbjAMN20 (ORCPT ); Fri, 13 Jan 2023 08:28:26 -0500 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56CB42AC9; Fri, 13 Jan 2023 05:20:27 -0800 (PST) Received: from wsk (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 845AE81A0E; Fri, 13 Jan 2023 14:20:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1673616025; bh=1qSwriZFPF+/gR3HQS3JEWuiTAkSalzYficrKXK36/o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SSFFxxBD6FxXQZTcjwHGi5dVi0J9Qt+UVmhfaGUiD+MxZNkIk0HK2/Ym6TyEVXRIW SJVKhKTYPCTUsjFv14k2xLUhWh9fwcwmK/aBzBTqB81m86kOrs0RRc0IMYHuANIT9f UN/rQTElGMGVpSBkCyI7XhD/ajCVDUo3qg6bOxWjf0BD7xLZpyhaIbruKA8bppO99/ Llr5VXgMW0oIRxOUHMKorIldbTglOw3nHyW2BJH9EzjR1+w2xV5+p8XoPXmC8vxQNm fef+NtwF/y8HLC3yuwig6CTJOKRclynikbip5nsUlxwAN6eRPv+DsVHyjqQF4dYOYR dC8R9pKsyT9Lg== Date: Fri, 13 Jan 2023 14:20:17 +0100 From: Lukasz Majewski To: Vladimir Oltean Cc: Andrew Lunn , Eric Dumazet , Florian Fainelli , "David S. Miller" , Jakub Kicinski , Russell King , Paolo Abeni , Alexander Duyck , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/3] dsa: marvell: Provide per device information about max frame size Message-ID: <20230113142017.78184ce1@wsk> In-Reply-To: <20230113122754.52qvl3pvwpdy5iqk@skbuf> References: <20230106101651.1137755-1-lukma@denx.de> <20230106101651.1137755-1-lukma@denx.de> <20230106145109.mrv2n3ppcz52jwa2@skbuf> <20230113131331.28ba7997@wsk> <20230113122754.52qvl3pvwpdy5iqk@skbuf> Organization: denx.de X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/mh=pNnydW6R9nPnu00U2rBP"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/mh=pNnydW6R9nPnu00U2rBP Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Vladimir, > On Fri, Jan 13, 2023 at 01:13:31PM +0100, Lukasz Majewski wrote: > > I think that this commit [1], made the adjustment to fix yet another > > issue. > > [1] - > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/comm= it/?id=3Db9c587fed61cf88bd45822c3159644445f6d5aa6 > > =20 >=20 > It appears that this is the commit to blame, indeed. >=20 > > It looks like the missing 8 bytes are added in the > > mv88e6xxx_change_mtu() function. =20 >=20 > Only for DSA and CPU ports. The driver still behaves as if the max MTU > on user ports is 1492 bytes. >=20 It looks so... > > > I wonder, shouldn't we first fix that, and apply this patch set > > > afterwards? =20 > >=20 > > IMHO, it is up to Andrew to decide how to proceed, as the > > aforementioned patch [1] is an attempt to fix yet another issue [2]. > > [2] - > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/comm= it/?id=3D1baf0fac10fbe3084975d7cb0a4378eb18871482 > > =20 >=20 > I think the handling for those switches were neither > port_set_jumbo_size() nor set_max_frame_size() is present is just a > roundabout way of saying "hey, I only support ETH_DATA_LEN MTU and > can't change it, leave me alone". But it isn't what the code does. I tend to agree... The number of switched which suppor 1522 B max frame is only six. This may be why the problem was not noticed. The fixed function maybe should look like below: static int mv88e6xxx_get_max_mtu(struct dsa_switch *ds, int port) { .... =09 int max_mtu; max_mtu =3D chip->info->max_frame_size - VLAN_ETH_HLEN - ETH_FCS_LE; if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port)) max_mtu -=3D EDSA_HLEN; return max_mtu; } Comments more than welcome. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/mh=pNnydW6R9nPnu00U2rBP Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAmPBWpEACgkQAR8vZIA0 zr1Vmgf8CFpBbPXV2vgFguRKQywDjo4dxWBziC9RBu4QTEuAkOMq3A/YpHanvOlE ZsZtpSyRe3raTcpwFGkWn+1VtGR5wpma5tvvK4t+NPJYy3RCaSivIsQnpBIGCiQQ pM48fne05BMfZWwAlAr3vUQAtmjztlPthCnKHhcOBCepUSfQbxELQ9smYgQ1JsfQ vvnR0alHFaIHHv4FvrsswjJzWzhzhXUk1D1u71t6d5g2EI6TtTkL3H/RMargVbCa J5MTzXGIolMcjk8Gj09UKRPFNAM9lnDAdinWaK7MPtL5RWUiTdMs5bLTypTX0arF xgi6TqD9Qzh6V7G9tiRXjRGR6FI0Ew== =nndL -----END PGP SIGNATURE----- --Sig_/mh=pNnydW6R9nPnu00U2rBP--