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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A54CC433FE for ; Sat, 5 Nov 2022 23:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229849AbiKEXkj (ORCPT ); Sat, 5 Nov 2022 19:40:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbiKEXki (ORCPT ); Sat, 5 Nov 2022 19:40:38 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4498F12767 for ; Sat, 5 Nov 2022 16:40:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=X3OTdrQ6wjAVDZOUJjS9JczyWRFUBeCb9UTgdwJUH/c=; b=xEDqDNGLOoMP6TILbsVJZaSznK oX/wEsYVR/97dN1sbKUbqHkyIQqXbFCdE2LjiBD1lJEITEAQzknf7MC8lZubCMyeUX+UFSJS0d9zW XqEUBUso7uMwOGmLc+wzNDFSoQ7CXnKzvN182bVcMxiNCI2i+WnanLRyCT3IaI5FEoO4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1orSm8-001ZGK-MJ; Sun, 06 Nov 2022 00:40:32 +0100 Date: Sun, 6 Nov 2022 00:40:32 +0100 From: Andrew Lunn To: piergiorgio.beruto@gmail.com Cc: netdev@vger.kernel.org Subject: Re: Adding IEEE802.3cg Clause 148 PLCA support to Linux Message-ID: References: <026701d8f13d$ef0c2800$cd247800$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <026701d8f13d$ef0c2800$cd247800$@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Nov 05, 2022 at 06:42:10PM +0100, piergiorgio.beruto@gmail.com wrote: > Hello, > I would like to add IEEE 802.3cg-2019 PLCA support to Linux. Could you recommend any introductory document? 802.3 can be heavy going. > PLCA (Physical Layer Collision Avoidance) is an enhanced > media-access protocol for multi-drop networks, and it is currently > specified for the 10BASE-T1S PHY defined in Clause 147 of the same > standard. > This feature is fully integrated into PHY and MACPHY implementations > such as the onsemi NCN26010 and Microchip LAN867x, which are > available on the market. Do the MAC and PHY need to negotiate this feature? Does the MAC need to know if the PHY is PLCA capable? Ideally, genphy_c45_pma_read_abilities() can determine if a PHY is PLCA capable? And the MAC can then check the result of this and enable its part of PLCA? > In practice, what we need to do is configuring some additional > parameters of the PHY: PLCA ID, TO_TIMER, NODE_COUNT, BURST. Are these purely PHY configuration values? Is the MAC involved at all? > The PHY registers for PLCA configuration are further documented in > the OPEN alliance SIG public specifications (see > https://www.opensig.org/about/specifications/ -> PLCA Management > Registers) Nice. But do the available PHYs actually follow this? Ideally you should provide a set of helpers which implement these registers. But you have to assume that silicon vendors will ignore the standard and implement it differently. They often do. So the helpers are just helpers, and the PHY driver needs to be able to implement these values in there own way. > The parameters I mentioned has to be configured dynamically. How dynamically? And what is setting them? Do you see the need for a user space daemon? Are values placed in /etc/network/interfaces? Ethtool does seems like one option. But i would like to understand the bigger picture before making a definitive answer. Andrew