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 87ED3CD4857 for ; Wed, 4 Sep 2024 17:48:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=5lrAIY666kuXUBCi+wo5/zYldvxY9h3q7HZm7kbftVA=; b=Finran5xyv7NPeemSwYYU1hzzz 4GY+Lxc0JyMpCfSiIyAjauYANlLWyq8r789gUHss20L3lAXT+hFkII1cXJbv5Fbh5G+acH8SU/lvc 9/57vzZxu4Wxg2r0VF7JHwiOWzj3fidB7FxTWyZMNWaRX/B5YhseLFlEIpQodKK9flWa3SodXg6nv h9UbtNAGe+yb/Wz774EBYX3WTRHdSnEvGdPwnhWVqHnso7qpk4oUMm1Cf29mpH0qgXNQslSndSSXA yxs02dlquFhkTpnCmJfVEYfmh9ejbhU29cGtVCvHjfnsmConY+7r3RQhg7vYqxunYk63hbbI+wLTm 0nWMYmRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slu7J-00000005WCc-18Ip; Wed, 04 Sep 2024 17:48:29 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slu6G-00000005VrZ-03CK for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 17:47:25 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 399DBFF803; Wed, 4 Sep 2024 17:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1725472041; 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=5lrAIY666kuXUBCi+wo5/zYldvxY9h3q7HZm7kbftVA=; b=ZxuJeXDHi359wklqIU/J/WmVpxaFuHD6eG7XzZrdZDJOXnAwfp8uHoXsFSauy2mWdqFZrC +V3fF83Qo1UkmljlOLa5HGSTG1uSPZHv0LZASkIyTQ1t8ZCQ5gF2s3T9ATKfO1ji+zUcG0 wT4NOK9YJrh7hPsKcZsceuXZQYYm/zWFcQqHNAwkmn1G6agd5626GLhLkivPHvoJPFR6U7 B34NeuWmvCX5MHANfGxrbT5sZvbWMDP4aLsUoPuUaZRN2F3FH4vsb1hFs8f3p3pW61hq7J d/wSdpKVTNiaU2UxLvRT0EkaCfzzKpVp/CW034Q4G+ClmLUyDnSPprUjEtcNOQ== Date: Wed, 4 Sep 2024 19:47:17 +0200 From: Maxime Chevallier To: Michal Kubecek Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , 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 , Jonathan Corbet , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , Simon Horman Subject: Re: [PATCH ethtool-next v2 3/3] ethtool: Introduce a command to list PHYs Message-ID: <20240904194717.60ba4df6@fedora.home> In-Reply-To: <7fpbxztptolcuz4ppppkmpmblel7mv4nh4jgkjqbdedo4hrcjc@6oo6acqfejas> References: <20240828152511.194453-1-maxime.chevallier@bootlin.com> <20240828152511.194453-4-maxime.chevallier@bootlin.com> <7fpbxztptolcuz4ppppkmpmblel7mv4nh4jgkjqbdedo4hrcjc@6oo6acqfejas> Organization: Bootlin X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240904_104724_384314_524B08D4 X-CRM114-Status: GOOD ( 21.92 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Michal, On Mon, 2 Sep 2024 00:07:56 +0200 Michal Kubecek wrote: > On Wed, Aug 28, 2024 at 05:25:10PM +0200, Maxime Chevallier wrote: > > It is now possible to list all Ethernet PHYs that are present behind a > > given interface, since the following linux commit : > > 63d5eaf35ac3 ("net: ethtool: Introduce a command to list PHYs on an interface") > > > > This command relies on the netlink DUMP command to list them, by allowing to > > pass an interface name/id as a parameter in the DUMP request to only > > list PHYs on one interface. > > > > Therefore, we introduce a new helper function to prepare a interface-filtered > > dump request (the filter can be empty, to perform an unfiltered dump), > > and then uses it to implement PHY enumeration through the --show-phys > > command. > > > > Signed-off-by: Maxime Chevallier > > --- > [...] > > diff --git a/netlink/extapi.h b/netlink/extapi.h > > index c882295..fd99610 100644 > > --- a/netlink/extapi.h > > +++ b/netlink/extapi.h > > @@ -56,6 +56,7 @@ int nl_set_mm(struct cmd_context *ctx); > > int nl_gpse(struct cmd_context *ctx); > > int nl_spse(struct cmd_context *ctx); > > int nl_flash_module_fw(struct cmd_context *ctx); > > +int nl_get_phy(struct cmd_context *ctx); > > > > void nl_monitor_usage(void); > > > > Please add also a fallback to !ETHTOOL_ENABLE_NETLINK branch, similar > to other netlink handlers, so that a build with --disable-netlink does > not fail. You're right, I'll add a fallback for that. I actually just faced that exact issue trying to build this patchset using a fresh buildroot setup, having forgotten to add netlink libraries. Thanks for the reviews, Maxime