Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5694921rwb; Mon, 5 Dec 2022 02:51:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf7afcBbGTGDHPdXq+k4SHLME6YcJ1ZW3Kk6AR4a3Mq95H40C1HXZPeMIYCOzOVXsDhG3KhV X-Received: by 2002:a17:907:75c7:b0:7c0:8371:97a9 with SMTP id jl7-20020a17090775c700b007c0837197a9mr24721807ejc.583.1670237473518; Mon, 05 Dec 2022 02:51:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670237473; cv=none; d=google.com; s=arc-20160816; b=EupoU1ZUJ50aLBnfuAv/vcY1l9eTQ3sRXQeY1wm3gan2o08ZEHXXSs4N5Dm0FhoCL9 QGMIoynZAWZJIAhTa2vJq/3y6zmzbMc/Wida6yE1Tqxrj0oyaE5wPwZa+pJr9P+3mmLa laxyahnbeRhX4nNETFi+3gY0AUa/rUev23eIcmMJl6yR1QXJ2XD5gLY3072cHbcjkL3P g8KORREpHx+MG8hWTO+UZSBOfb5t/iXhac4voeXhU3p/jpBT5RrIaKSgkeYJ6wTRiCL9 avgojScvqjZ5e5sM+ubgQSv6V/8Nirb3Pwzwoie9WyLYlYb00loHqh9DQu1+mKYuFF9X WVJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jxVtoxcRgd7da7JgXZYHbCU+ItZZ7D+FIDMeJVI90wc=; b=XXCiX9fN5UfHkbMQfppyUFPkg9K7kxyBKx+Uynawn7Pou5VpmRifB8DLaBAW3ZDXV5 QPH+OLSBzlz87qSL9w395+P39JxUA507+vbceDDFny0prQQUG2mUYIRu9Z31rx0G3k96 Wrsdr3p1W2B0l+7cmavb1xkVgTJx/mdkUSkG1UDM/C1x35H1ndUWTCIdvBLl4FGjbiN7 7jDKsjtq8fzZtuLBT7QG9GIwdtv5i2c347ztVtndvfDq811XKHre/ExC0sUyo5UqqYt0 Wf84zTjZRCdLNVro3KUgkdeeoJSpwzHSKFLFrfKsNcbzAlhYzsZp8mkcvpoRRXGSNRq+ tdcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a056402280900b0045a1dbedd92si12760255ede.35.2022.12.05.02.50.53; Mon, 05 Dec 2022 02:51:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbiLEKWY (ORCPT + 82 others); Mon, 5 Dec 2022 05:22:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbiLEKWW (ORCPT ); Mon, 5 Dec 2022 05:22:22 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A82D319286 for ; Mon, 5 Dec 2022 02:22:21 -0800 (PST) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p28bz-0001Qv-C5; Mon, 05 Dec 2022 11:22:11 +0100 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1p28bx-0005bw-DV; Mon, 05 Dec 2022 11:22:09 +0100 Date: Mon, 5 Dec 2022 11:22:09 +0100 From: Oleksij Rempel To: Piergiorgio Beruto Cc: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v2 net-next 1/4] net/ethtool: add netlink interface for the PLCA RS Message-ID: <20221205102209.GA17619@pengutronix.de> References: <20221205060057.GA10297@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 05, 2022 at 11:03:58AM +0100, Piergiorgio Beruto wrote: > Hello Oleksij, and thank you for your review! > Please see my comments below. > > On Mon, Dec 05, 2022 at 07:00:57AM +0100, Oleksij Rempel wrote: > > > diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h > > > index aaf7c6963d61..81e3d7b42d0f 100644 > > > --- a/include/uapi/linux/ethtool_netlink.h > > > +++ b/include/uapi/linux/ethtool_netlink.h > > > @@ -51,6 +51,9 @@ enum { > > > ETHTOOL_MSG_MODULE_SET, > > > ETHTOOL_MSG_PSE_GET, > > > ETHTOOL_MSG_PSE_SET, > > > + ETHTOOL_MSG_PLCA_GET_CFG, > > > + ETHTOOL_MSG_PLCA_SET_CFG, > > > + ETHTOOL_MSG_PLCA_GET_STATUS, > > > > > > /* add new constants above here */ > > > __ETHTOOL_MSG_USER_CNT, > > > @@ -97,6 +100,9 @@ enum { > > > ETHTOOL_MSG_MODULE_GET_REPLY, > > > ETHTOOL_MSG_MODULE_NTF, > > > ETHTOOL_MSG_PSE_GET_REPLY, > > > + ETHTOOL_MSG_PLCA_GET_CFG_REPLY, > > > + ETHTOOL_MSG_PLCA_GET_STATUS_REPLY, > > > + ETHTOOL_MSG_PLCA_NTF, > > > > > > /* add new constants above here */ > > > __ETHTOOL_MSG_KERNEL_CNT, > > > @@ -880,6 +886,25 @@ enum { > > > ETHTOOL_A_PSE_MAX = (__ETHTOOL_A_PSE_CNT - 1) > > > }; > > > > > > +/* PLCA */ > > > + > > > > Please use names used in the specification as close as possible and > > document in comments real specification names. > I was actually following the names in the OPEN Alliance SIG > specifications which I referenced. Additionally, the OPEN names are more > similar to those that you can find in Clause 147. As I was trying to > explain in other threads, the names in Clause 30 were sort of a workaround > because we were not allowed to add registers in Clause 45. > > I can change the names if you really want to, but I'm inclined to keep > it simple and "user-friendly". People using this technology are more > used to these names, and they totally ignore Clause 30. > > Please, let me know what you think. A comment about name mapping to specification, spec version and reason to take one variants instead of other one will be enough Somewhat similar to what i did for PoDL. See ETHTOOL_A_PODL_* in Documentation/networking/ethtool-netlink.rst and include/uapi/linux/ethtool.h It will help people who use spec to review or extend this UAPI. > > > + > > > + /* add new constants above here */ > > > + __ETHTOOL_A_PLCA_CNT, > > > + ETHTOOL_A_PLCA_MAX = (__ETHTOOL_A_PLCA_CNT - 1) > > > +}; > > > > Should we have access to 30.16.1.2.2 acPLCAReset in user space? > I omitted that parameter on purpose. The reason is that again, we were > "forced" to do this in IEEE802.3cg, but it was a poor choice. I > understand purity of the specifications, but in the real-world where > PLCA is implemented in the PHY, resetting the PLCA layer independently > of the PCS/PMA is all but a good idea: it does more harm than good. As a > matter of fact, PHY vendors typically map the PLCA reset bit to the PHY > soft reset bit, or at least to the PCS reset bit. > > I'm inclined to keep this as-is and see in the future if and why someone > would need this feature. What you think? Ok. Sounds good. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |