From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D382C3DA6E for ; Fri, 5 Jan 2024 15:35:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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-Owner; bh=TJKBD9lqWMwt/WM2eJUFCVGwEqlFRCElmA8wcwbd3qE=; b=aZOiwpioS4a9EU 6G8P6TFEqtIF75LX77qOwkcuBhrMVH4Yg0cBC5f4XvReOG2oy8NurVFlJ2Z9aqOTFOsj4KFw4eRRi OkTeOF7QoNH/jfQ/s6UGQDTIwQ+PvuPFCUWM9o87ob93psWigcKXwFGvz5D+tP2a3py/E6fXwXH9q klR2AO1n+FUK07ZUDE5TDuM9KvDzrBXja5Q04T/9Mjr3LqnjdtDt+z1uXDPVuwI/pCSCrynrS+E9e 4vzJaUGEqeiT5M2eZ49R32Tef5/RjxGLMbm0pZXDO3hn+0PVCS2mRsxlEXEZ4ufYv10+Fi3qkkS8N zMyeCDioR/NPrevAeLxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLmDb-00HB2J-2F; Fri, 05 Jan 2024 15:34:43 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLmDY-00HB0c-1z for linux-arm-kernel@lists.infradead.org; Fri, 05 Jan 2024 15:34:41 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 6160FCE1F4A; Fri, 5 Jan 2024 15:34:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3CF9C433C7; Fri, 5 Jan 2024 15:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704468874; bh=HlJFqg+osmXCgn/pXd3UWCmw8xaEkh4vZNHNpeYjElM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GSYVL9PTXAYSwpNALY1SVn2NXlMKmUEVgTF9+mh8uTuYpAxYLi2Wdx7VA4uK5leMy 8viMtR4nB43HoWEFWWkdnF4cPnTP9UW6zMAQ/q2+389q2YWnq44ojIUj1d0ivO24K5 2+A9bV8FRiOukLRlFbCSiImG/YQ1voZ5crrKPv8GFwSJ6FOOAr6i9m86dLuxWwYIdz vhv/bxh8tEjpzhJMMapIt++UdSNp5c135AkkTURe7pxgk2gkHsnILYAWIpS1TIHpmq L6wp54OdzK9K9CHBdzlnrymMOCM29X/X6GZ/BFng9LqIkXpSBbOC5Y+5EaK8rH+2+5 7ttzvqPCjh6PA== Date: Fri, 5 Jan 2024 07:34:32 -0800 From: Jakub Kicinski To: Maxime Chevallier Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Jonathan Corbet , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , Simon Horman Subject: Re: [PATCH net-next v5 01/13] net: phy: Introduce ethernet link topology representation Message-ID: <20240105073432.671159e9@kernel.org> In-Reply-To: <20240105102918.24398552@device-28.home> References: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> <20231221180047.1924733-2-maxime.chevallier@bootlin.com> <20240104151242.52fa8cb4@kernel.org> <20240105102918.24398552@device-28.home> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_073440_830608_6072D628 X-CRM114-Status: GOOD ( 11.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 5 Jan 2024 10:29:18 +0100 Maxime Chevallier wrote: > I'll give it a try, it could be doable to try to keep the index for > _some_ PHYs. I had a first try at this in the very first iteration, but > that was lost when converting to xarray for the index management. Since > the phy_device keeps track of its own index, we can try to re-use it, > but I can see it becoming difficult if we destroy the topology when all > PHYs are detached (after ndo_close). What I was thinking is if phy already has phyindex, and that index is unused in the xarray of netdev in question - try to use that phyindex instead of allocating a new one? IDK if phys can move between netdevs, or get freed/recreated automatically - otherwise it should work? (If user unbinds and rebinds the PHY driver for instance that's their fault, we can renumber). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel