Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4625857rdb; Tue, 12 Dec 2023 05:10:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaRibq3GoDCwvGPF+6QjLI9G+O0rmZYB7EQZgrLA3aCbk3GJkyJIOF/sx5DlGfEFf+Vf9Z X-Received: by 2002:a05:6a00:218a:b0:6cd:9033:b3d0 with SMTP id h10-20020a056a00218a00b006cd9033b3d0mr3214452pfi.28.1702386649216; Tue, 12 Dec 2023 05:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702386649; cv=none; d=google.com; s=arc-20160816; b=P0UaluyrxymIrAlJymiFAS8wok2op3KlQ0hRagybB2LUtASA9fle+wWKqDKKkZyPYn pZun+LiPM6ehYIqNevHXHFfrpV8UhWvxizVh4rh6qK4Ol3DpnPP0iITGXEEEsUNnDw15 wcNrVDdsEJWTCuf2Rfl0ximNHPKIg3LyHKXrWEx9GYxi8fZEtwSiS1hyLGhHa3qgI/To KN7YxhN4iXM1mloAkF+Z/naVG3iqcvo2DQh6EuWjrPXPFUhuma12PY2s1HRrWfxvEAqw O1AK1DdIMiuAK3Lh1046IN2DE1WgdREm9tbtWn6dIaKmeHFi3hBgkEHemCBkTeV1C/JK tk3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=atELFnnIPthqWoz2bHuN1bLUw36gajFDes0IJ/cmoaA=; fh=TtghiL1d5IJsEJIiHX6LWjMJksMjnqzktJRCYi5T5m0=; b=uFSAjHlO4TsAd+fQnDsgOk05WR/zpC3nJ7quur5mQzGBPk+Jpd3jSDa0pufMirIgWd /w1s02tMfAArqXquh6OQne1z9NSG29HbNqmVcp75TLk/Vp1rI26MW7s0wtBeqzIWHwdz qyy8uU7G2e6bA+ptq4OmNzmI8WsppdWtplFWu+FD30J8px4v5GpgDjAWlrMFYg55XnM6 CXwWoGdh5RtDPoMHWCUYZAJqCBva9RvKjg8acio8pc/sPpbDjHDLmQv7Xc/qazWN5Fin eP9xjQlcrMtLIyOshvDyZGuD0r7TzX1NyBU0xwnNPrSxIHt74/Urv11EEN+uuQm2jeNN fgTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aW8gD0JR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id h7-20020a056a00230700b006ce03e2549csi7707204pfh.4.2023.12.12.05.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 05:10:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aW8gD0JR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AFEFA80952E0; Tue, 12 Dec 2023 05:10:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376543AbjLLNKa (ORCPT + 99 others); Tue, 12 Dec 2023 08:10:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376524AbjLLNK3 (ORCPT ); Tue, 12 Dec 2023 08:10:29 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E4FDF4; Tue, 12 Dec 2023 05:10:31 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 031601C0007; Tue, 12 Dec 2023 13:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702386629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=atELFnnIPthqWoz2bHuN1bLUw36gajFDes0IJ/cmoaA=; b=aW8gD0JRdbGr0NXlm1/llPif8XCoQDwRZP9mhQl30Bb1nhbVJ9YfMP6npegebx2FhmVNuG cFg4LCrmzoeje3lshNHVDKmZf1t7Biz89foTOLpNkFOu5URuDBnXqAOnlyHnExKYETXjNc 6gyGq10FG130gPiUsJixdIYmMFH2V4BB/Nl3LhmsabozpPhSY0zlivgkaONO4sFxJMwpXV qYDLYX6x6mQDv/xjZhsz2UwwzkGmbRLu9lNcEXBQKFsZHrg7kZvoEqhbyielS3ubVC5E8z Fe+NxJa+T/WhdwwNnh1z2EWAC9Nj9Z2FVwER92sEp5heBmkwYlmjR9SSGd7MnQ== Date: Tue, 12 Dec 2023 14:10:26 +0100 From: Maxime Chevallier To: Andrew Lunn Cc: Simon Horman , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Jakub Kicinski , 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 Subject: Re: [RFC PATCH net-next v3 01/13] net: phy: Introduce ethernet link topology representation Message-ID: <20231212141026.37e7af58@device.home> In-Reply-To: <67557c83-4318-4557-ac96-858053b5f89b@lunn.ch> References: <20231201163704.1306431-1-maxime.chevallier@bootlin.com> <20231201163704.1306431-2-maxime.chevallier@bootlin.com> <20231209170241.GA5817@kernel.org> <20231211120623.03b1ced4@device.home> <67557c83-4318-4557-ac96-858053b5f89b@lunn.ch> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Dec 2023 05:10:46 -0800 (PST) On Mon, 11 Dec 2023 15:09:09 +0100 Andrew Lunn wrote: > > > > @@ -10832,6 +10833,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); > > > > + > > > > > > I don't think this can work unless PHYLIB is compiled as a built-in. > > > > Inded, I need to better clarify and document the dependency with > > PHYLIB. > > It is getting harder and harder to make the phylib core a module :-( > > How much work does phy_link_topo_init() do? Could it be an inline > function? Are there other dependencies? Sorry about that, I'll make sure it works with phylib entirely disabled for next version. I try to keep the integration with net_device minimal and avoid any dependency bloat, we don't need much besides xarray stuff (hence the fact there are 2 headers, the phy_link_topology_core.h containing the bare minimum), but I did miss that. > Also look at ethtool_phy_ops and e.g. how plca_get_cfg_prepare_data() > uses it. Thanks, indeed that's a good example. I'll also address that in the netlink part as well. Thanks, Maxime