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 2F27BC3DA6E for ; Fri, 5 Jan 2024 15:40:33 +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=xp+3LA26h2HAIQgYWkO+3VhTa0blNcYeYo1ykRSg3Jc=; b=g4/00k+YDe+mJF pqRFt6fZoH5eI4Jn+jbm+CSwtto8dcFVuMPY4+i6grvWrOarQL1W6w2/G+fGRYoiVaIIPgJBqJN19 YenMvrrTwTd4PxGWYllkWgFksH8RGIwY3jQoomWDWOBX502V9fWz+6wgfWa5rShgj0vvS+bkydHlr rmPdbAQrztk8lg/Z6HxAz0XFlna/yKEoqtOXpOmzTrIelfZ0W8dMvY/wHOCRgTtwGbIYCwXjBIJMJ IFn9B5Wz+9zaHQZtuKBj7tpnoFL+3OjNUTuOiEAx3d/bWUTax8Gjv7QM+iHxTztVuH7HhHoppCcTq fSt0ml5E84ahp23cc0Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLmIk-00HC2K-0B; Fri, 05 Jan 2024 15:40:02 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLmIh-00HC0h-1F for linux-arm-kernel@lists.infradead.org; Fri, 05 Jan 2024 15:40:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3580ECE1F10; Fri, 5 Jan 2024 15:39:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B461C433C8; Fri, 5 Jan 2024 15:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704469185; bh=Fd9R1t7XEMCEHJZB7WawIlb8aaIzMwLL0iD9yFevkzk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Jrhu6jAub+POaFLe7c9KTb6YFKz04dIwf3OvlE17GXqA9kPJawkiC4YX4hsIJMCR9 STdE147ItVPDswOTs3fe1gi40PP2u/UAQNn179K9mJJ2FjJwnh0BeVn9sO8LiMCBts nY9DZKgqk9R9XHgnS4cXbWOnwwWTK6kncWmCPHReOOpdCYQ+zBRwORflga8MtpqcCM Kz3x85pQcxeqahhfPp1ML/f+QgoC7qz+bZhlDnVruA/nX4DZiLPJgrRtaHF/svyFgV H3h8UsDzQFGI6hmMvui3se514N7mmdMs/yfUvL5/FNmNVQXy804B0b+bVfK6UGJXC/ Y5+P6fZefy1PQ== Date: Fri, 5 Jan 2024 07:39:43 -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 07/13] net: ethtool: Introduce a command to list PHYs on an interface Message-ID: <20240105073943.43fc2720@kernel.org> In-Reply-To: <20240105104311.03a35622@device-28.home> References: <20231221180047.1924733-1-maxime.chevallier@bootlin.com> <20231221180047.1924733-8-maxime.chevallier@bootlin.com> <20240104153401.08ff9809@kernel.org> <20240105104311.03a35622@device-28.home> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_073959_616369_77AC0B79 X-CRM114-Status: GOOD ( 15.11 ) 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:43:11 +0100 Maxime Chevallier wrote: > > > +static int ethnl_phy_parse_request(struct ethnl_req_info *req_base, > > > + struct nlattr **tb) > > > +{ > > > + struct phy_link_topology *topo = &req_base->dev->link_topo; > > > + struct phy_req_info *req_info = PHY_REQINFO(req_base); > > > + struct phy_device_node *pdn; > > > + > > > + if (!req_base->phydev) > > > + return 0; > > > > The PHY INDEX should probably be a required attr, with > > GENL_REQ_ATTR_CHECK()? Without phydev being specified > > what's the point? > > We can still have a phydev without passing a PHY INDEX, this would > report information on the netdev->phydev device, that can be helpful > for users to know which PHY is targeted by commands such as "ethtool > --cable-test eth0" when no PHY index is passed But req_base->phydev will be netdev->phydev if user didn't specify the index. Are you saying this is for commands which can operate on netdevs as well as on PHYs (e.g. "integrated NICs" which don't user phylib?) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel