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 18558C47073 for ; Fri, 5 Jan 2024 00:16:25 +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=MpMT55h31nnsucK1YjqNOcoUV75S9LFKlCoKBXvNrbQ=; b=fw/QchwFs+4PJp rRQjsu7XGIk9rCKjvrfEdGnhioHDV9ROihuTqaknjKugHz3GKQxZpW5CytF5sZzTDhhOJ4dTRIDXm KXiSDAxeDzURNn3SG+MpO8Ph3GZP1vJf2VDM0BIST5BDAg++4R1akcK2EQNtVHQK4xZRIxiz7/U7B 1JobEpMgOjTv5uFKaYwR4Sz6TN5WkNJ6Qx4KYm+b11G3zscf1V8a+IWZTD+ahQq97jJEK1v40NQnl pTnKubHUHacKfppqQ6WFvH5P32mnnZrChJ1gFUMqX2mOYOCA5f+pkI+670OolzvVpeOu2hYUVNH8/ LvAQcm1hQLxrZGHrM7AQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLXsQ-00FdMb-1y; Fri, 05 Jan 2024 00:15:54 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLWtY-00FR6T-0W for linux-arm-kernel@bombadil.infradead.org; Thu, 04 Jan 2024 23:13:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=Q0MxSa+Y3CXRirXVa6rgGykcuAMJko6xDLLC/qm9iLs=; b=BFQTM5K0iLrQymkCyegELS6G3r nuoZjiqUaeL70ibBlFm9mue2dzd4dfJ6lceXIm40nT1tluLj7w2idPad787p9jsHrc+mmoB50mFZy GiJq4QcrhCXyn/2WQIvuowpJ2kb/Fo5Eyg8aXuSTAiuqSeDclVkTJTnAvAtHAZJOrx20K/QHzS+D5 FSH0NeJMgHVSn2QqzDPNUrKE6MmqjZI4swerYpV3CJ5zQ0A2fWbXhoz0s2ySIGYOToZ2JyyqIwj8V s8uiTiVIg9sud1AqtXoFObhB+GEbHTLVYjDXuqW1Pl99cIwQz/gM8Kcm0ChHnFJkeFk9V1Hsx/7Gf s+Nqe/WQ==; Received: from dfw.source.kernel.org ([139.178.84.217]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLWtU-0069OI-1p for linux-arm-kernel@lists.infradead.org; Thu, 04 Jan 2024 23:12:58 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id DA7486187A; Thu, 4 Jan 2024 23:12:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4408C433C7; Thu, 4 Jan 2024 23:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704409964; bh=pna8e9qSOEoIxNWRYi8FBs+Y3qy9hZxpLEHfzkPhAic=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=K7uutDbOmNGjFWw3LNJOkzdRI12thZbYoWybuII94Oumo+hdXEvUXvCMvw0YYbjyB eAI19/r67/1Wnl5uwHCoIGnbGMn6A7W20m2Mc0fFC2wQ08RxCydThkigdlrdvToazm on7ChpgLLum9DQ7HJOPa3wnMKRb0lqG4qG5Ld+cjWesc/R9orAtE/A5IOzD/kTQVbD hujps7Zm+aO0RSUAgfSgA83ELs2aofO/O7faW3mV2ex2gxpQ1JVhY0nx02iFP1fSR1 J4l1Mbgfa8NajA7xR9HQFOaghWhpitCqKQvVrp4FfyoGWXTJE0f2YhrYRfGJdcOF9z QU7iTVyedRgvw== Date: Thu, 4 Jan 2024 15:12:42 -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: <20240104151242.52fa8cb4@kernel.org> In-Reply-To: <20231221180047.1924733-2-maxime.chevallier@bootlin.com> References: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> <20231221180047.1924733-2-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240104_231257_035382_3E81C521 X-CRM114-Status: GOOD ( 11.67 ) 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 Thu, 21 Dec 2023 19:00:34 +0100 Maxime Chevallier wrote: > @@ -2441,6 +2442,7 @@ struct net_device { > #if IS_ENABLED(CONFIG_CGROUP_NET_PRIO) > struct netprio_map __rcu *priomap; > #endif > + struct phy_link_topology link_topo; Perhaps others would disagree but can we make this a pointer instead? Only allocate it on demand, when first PHY gets attached? Both saves space and netdevice.h will no longer need to know the definition of the struct. Complete noob question but I thought PHYs get attached at ndo_open time for drivers, don't they? We shouldn't want to re-ID in that case. > struct phy_device *phydev; > struct sfp_bus *sfp_bus; > struct lock_class_key *qdisc_tx_busylock; > @@ -10872,6 +10873,8 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, > #ifdef CONFIG_NET_SCHED > hash_init(dev->qdisc_hash); > #endif > + phy_link_topo_init(&dev->link_topo); > + > dev->priv_flags = IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM; > setup(dev); > I think you're missing a call to xa_destroy() somewhere, no? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel