Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7128708rdb; Wed, 3 Jan 2024 05:42:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuGZxHuDUUMD4XTyeV7ipC5A057o9VOTB1qRSkKXQr2HP0fduS75kUG8bg5SDZKebvXLPU X-Received: by 2002:a17:90a:ae09:b0:28b:eaa5:7986 with SMTP id t9-20020a17090aae0900b0028beaa57986mr6238681pjq.95.1704289336154; Wed, 03 Jan 2024 05:42:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704289336; cv=none; d=google.com; s=arc-20160816; b=B+ZiRLByDYD8UlwA8e/IY2Rpdk6AD5b+wPLzcMU6iuad2gX6nF8MMtzBsWOViP1fDU PI+Tt8U54cUmEERrZ9jNrJBYEBoBqoh04DTq1w2mU1LHCzpoCmjpDvd5cxdS+nZKa4Me sXrHmsokEc8yIZLkeNnBu50Zvlegsx1aDKKd0LLxrKEM0pRffeSlCkZV4xxt/uh4IZBV hw5V0tFJbekk60T8ILwbmOZW4EjbrM0BWiJcKiZ6Vec3R+oExfd0uEtQZmkRMKJ9UzO7 GnYE6bT20Lw/UExmXUbwQY9oSu7q2MfGRogBYGRqa2d1oN6w3bNTS3aOYMApLcmnVD9j zQEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wftCAkDxtuNgREe2HZPa3UL9Ps/2/U2R6GRFaMlVY1k=; fh=aR1CgzhSLBTb6+kQc9wMNJpS8fxOgAPC5+MdgrgG+Dk=; b=WWsKIHNbUe2vkBgkpFGcSXbPRKiTxGrF5MuktzSk43Ab1Z2FV5K2AC35evHpkp/x7b +rZIRa9Lf8N7v8IQvOeDHoPclRCOC/gLySz8LiC13m3ZYH+zYzB6V7lBU0qAzVt0shsl 6aJaiuAxZQUHWYYxN+I8s3VAb8qIo5HPJ2iisZEHZYPr0qjalf3Ve2D6nlkK0y/eT/Ka Ciz1hHlJDpWT+6DeY82j+0aT0h1B2L0JjkUKCN2dexlxc5MhkKhhrzUFahxHJQKTD8hC Or7YLldMftMSyllTscQY5fvFADApiOwgRuq6rrq4LbYXHvfnXU5jDaJLXrBbFhIvkb/y A23g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=USeuP+6k; spf=pass (google.com: domain of linux-kernel+bounces-15606-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k92-20020a17090a3ee500b0028c6b3fc762si1203940pjc.155.2024.01.03.05.42.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 05:42:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15606-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=USeuP+6k; spf=pass (google.com: domain of linux-kernel+bounces-15606-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15606-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CAA2728230C for ; Wed, 3 Jan 2024 13:42:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73A651A72F; Wed, 3 Jan 2024 13:39:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="USeuP+6k" X-Original-To: linux-kernel@vger.kernel.org Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D085199D2; Wed, 3 Jan 2024 13:39:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=wftCAkDxtuNgREe2HZPa3UL9Ps/2/U2R6GRFaMlVY1k=; b=US euP+6kNtuAmnCHC5R82wsZ6MBoz1Rl+VJXsBp9EyebDf9hqY/etB3vrWp5JFVKvRR5Cgv49Uy5nYX grXMxco3T0Ss2j8U6bHNfqIQrwAZOhFU+TNQ/y8C0MnviLEq9UUb8AItIMRoQW7NRiulBBzLmTP+s iRVuFX5cS1Plwag=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rL1Sa-004G2B-2H; Wed, 03 Jan 2024 14:39:04 +0100 Date: Wed, 3 Jan 2024 14:39:04 +0100 From: Andrew Lunn To: =?iso-8859-1?B?U2FuanXhbiBHYXJj7WEs?= Jorge Cc: "s-vadapalli@ti.com" , "davem@davemloft.net" , "linux-kernel@vger.kernel.org" , "grygorii.strashko@ti.com" , "netdev@vger.kernel.org" , "kuba@kernel.org" , "edumazet@google.com" , "pabeni@redhat.com" Subject: Re: [PATCH 3/3] net: ethernet: ti: am65-cpsw: Add device tree property to set max MTU Message-ID: <644421dd-0d03-4a6f-98ae-93d2c2bd1b80@lunn.ch> References: <20240102081825.14635-1-jorge.sanjuangarcia@duagon.com> <20240102081825.14635-4-jorge.sanjuangarcia@duagon.com> <285f6402-db06-462b-9ca5-8363027283e1@lunn.ch> <2e09402c8cdd1109e730df58df3e59fdb3e5ab53.camel@duagon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2e09402c8cdd1109e730df58df3e59fdb3e5ab53.camel@duagon.com> > There are a few drivers that set the max_mtu based on "max_frame_size" > parsed from device tree. Here is a list: > > driver/net/ethernet/ > stmicro/stmmac/stmmac_platform.c > altera/altera_tse_main.c > socionext/netsec.c > ibm/emac/core.c So not many. > I also considered hardcoding this to the maximum capabilities of the HW > but I ended making this a configurable frame size. I beleive this way > it is more stable as?I don't know whether there may be any performance > issues if we default the max frame size on the swith registers to be > something different than the standard 1522 bytes. I need it for my use > case where there is a DSA switch connected to one port and I need some > extra room for the DSA headers. Generally, you just set max_mtu should not have any performance impacts, since the MTU will still default to 1500. The user has to take an action to change the MTU and only then could it have any impact, if implemented correctly. DT should describe hardware, not configuration of the hardware, and this is clearly configuration of hardware. Andrew