Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4007507rdb; Thu, 14 Sep 2023 09:04:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEiCM3d0LMSMz/AATyWSAnSUhg79ZqWp9LCGpu3yzTos6tyU/8heCBVGmmWqwmX5MdAHw0Q X-Received: by 2002:a05:6a00:1913:b0:68f:b3ed:7d56 with SMTP id y19-20020a056a00191300b0068fb3ed7d56mr6034682pfi.34.1694707488575; Thu, 14 Sep 2023 09:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694707488; cv=none; d=google.com; s=arc-20160816; b=CBpBuwptdkUIeaIeEt5UjTtsVMkAwjgNdeBncCBA7UfHji68RWt4H2CJnHr9cXQH4v KBhSicw00038xO3NZqgHrVCPTDKx4qmheW96hKW/f+EK5MfON+nSzYHIOwO+lEFg1DUx oggkhCOGsealCTarz8/GWXMsU+DKivo+Ses6w6FNxJN5xqMDCVRy++/uUDU58ppaqqsD lOGrKi82Vsxrp2KAmCzTWPorMyTtvS8ovwuecWjpZgYi4Y3OVq2tsA3fYoKi3j8mW3hU QMx3Lvg0loTtWIz5k2Xvekh2mjzAWnAIh1pVM22g7JHCOLEUQNSKE4mN1FQkxyWPNnXX iYkg== 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=5xP+NjQDRwSpB94Yxwb2tOKLdwEhsOpJuGakBvtmxKI=; fh=fWJn4eSHvl6IBEfNyIC1C0suqh2qmRqYA011bRZcNI0=; b=IiIw/dOZprVkIhE1XGTOUC4wsDMR2nn6VwzLgIkaaaAcyKXL0eM4fNFq7LYHIHCHFt 4e4xEKmC+6crGLMIsVAIbaJ4AIBSNm7vxTQrl0t1/NGoFv9ZLeOk1+X2W782dBNn6X0b 2umuuIzqkx4EdrK7aCBiIbTnk5wTS7B6WgYwP96PFz1aJ4AB2yfMOALnSPuiI2s1/CXh 31B6/SB+MGU/pNKRRgbpaV7NsphaPsfVloZEe9/8d+I8V8RuBunPqrfgewR3sbEKlsjh +7RC2dllmf1QqhAaQRp1AKvr7DZ3f5LvVpBGsUtYQ490n85rrv56A01WWca6mKMxH2FJ iYgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JNki3l03; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id br15-20020a056a00440f00b0068e3baee27esi1841863pfb.266.2023.09.14.09.04.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 09:04:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=JNki3l03; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 62E0580AFE88; Thu, 14 Sep 2023 02:36:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237170AbjINJgY (ORCPT + 99 others); Thu, 14 Sep 2023 05:36:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237303AbjINJgW (ORCPT ); Thu, 14 Sep 2023 05:36:22 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2773F83; Thu, 14 Sep 2023 02:36:17 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 96DEDE0007; Thu, 14 Sep 2023 09:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1694684176; 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=5xP+NjQDRwSpB94Yxwb2tOKLdwEhsOpJuGakBvtmxKI=; b=JNki3l03CjDlfeHtZf/4+WZHsKLcV1ghiFS6a7ZOiltadCBlIwhxQ7ul1zXNdXZ0dPwqB/ nzHR2+C8Az/HQUsVJdhthOgIJ1jR39eA89K77TZ/bo9tfYxYdt67onhi2li5kJyq1MxPTA i7+zR6lJD2DjPuZlmQt57jeQi6YpbNw7RYnhbD3889nsClROv5OuRHYgFnWj7yn329qQ9C N/ZwQmdoayt13OzIVmHD3DE5pRFHt0qa7iCh6HBz64Lg5RIusodyZSa3qrXhaH+S3AXiUv xicm/pm9st7Ve/+cLwdQHVW5rIVVTfOX/KqbZNhYxZYaLym3hWBiZ12vJvrtRw== Date: Thu, 14 Sep 2023 11:36:13 +0200 From: Maxime Chevallier To: Jakub Kicinski Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Vladimir Oltean , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , thomas.petazzoni@bootlin.com, Christophe Leroy Subject: Re: [RFC PATCH net-next 6/7] net: ethtool: add a netlink command to get PHY information Message-ID: <20230914113613.54fe125c@fedora> In-Reply-To: <20230908084606.5707e1b1@kernel.org> References: <20230907092407.647139-1-maxime.chevallier@bootlin.com> <20230907092407.647139-7-maxime.chevallier@bootlin.com> <20230908084606.5707e1b1@kernel.org> 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 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 (morse.vger.email [0.0.0.0]); Thu, 14 Sep 2023 02:36:29 -0700 (PDT) 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Hello Jakub, On Fri, 8 Sep 2023 08:46:06 -0700 Jakub Kicinski wrote: > On Thu, 7 Sep 2023 11:24:04 +0200 Maxime Chevallier wrote: > > ETHTOOL_MSG_PHY_LIST_GET, > > + ETHTOOL_MSG_PHY_GET, > > The distinction between LIST_GET and GET is a bit odd for netlink. > GET has a do and a dump. The dump is effectively LIST_GET. > > The dump can accept filtering arguments, like ifindex, if you want > to narrow down the results, that's perfectly fine (you may need to > give up some of the built-in ethtool scaffolding, but it shouldn't > be all that bad). I'm currently implementing this, and I was wondering if it could be worth it to include a pointer to struct phy_device directly in ethnl_req_info. This would share the logic for all netlink commands that target a phy_device : - plca - pse-pd - cabletest - other future commands Do you see this as acceptable ? we would grab the phy_device that matches the passed phy_index in the request, and if none is specified, we default to dev->phydev. Thanks, Maxime