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 04E11C742A7 for ; Fri, 10 Mar 2023 15:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231341AbjCJPri (ORCPT ); Fri, 10 Mar 2023 10:47:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233814AbjCJPrB (ORCPT ); Fri, 10 Mar 2023 10:47:01 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B3B2EBFA4; Fri, 10 Mar 2023 07:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding: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=MvFhqjBn8lsfHrgXKsRvl+cKYKntZywOxeyOqBNYdjE=; b=TM 3UJCQk0hGZKteBHnw0DOcgvkEPPN85rhLAKKF05n3myc43csiumRbPS4VkwATWqrDxI3A+KcJKEE7 Zk9OJ0g9VvNYEouuwIfV+LMEsiolzIN+8eYRgpkPr1cbHuGk/BBytaNqbNAGX3ChjucoUXKT7+hE9 hI4Z/BX8nNjvbo4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1paej9-006zM1-Ig; Fri, 10 Mar 2023 16:32:15 +0100 Date: Fri, 10 Mar 2023 16:32:15 +0100 From: Andrew Lunn To: Willem de Bruijn Cc: =?iso-8859-1?Q?K=F6ry?= Maincent , Florian Fainelli , Heiner Kallweit , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-omap@vger.kernel.org, Michael Walle , Maxime Chevallier , Richard Cochran , thomas.petazzoni@bootlin.com, Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , Joakim Zhang , Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Minghao Chi , Jie Wang , Oleksij Rempel , Sean Anderson , "Gustavo A. R. Silva" , Wolfram Sang , Alexander Lobakin , Marco Bonelli Subject: Re: [PATCH v3 3/5] net: Let the active time stamping layer be selectable. Message-ID: References: <20230308135936.761794-1-kory.maincent@bootlin.com> <20230308135936.761794-4-kory.maincent@bootlin.com> <6408a9b3c7ae1_13061c2082a@willemb.c.googlers.com.notmuch> <20230310154125.696a3eb3@kmaincent-XPS-13-7390> <640b45e9c765e_1dc964208eb@willemb.c.googlers.com.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <640b45e9c765e_1dc964208eb@willemb.c.googlers.com.notmuch> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 10, 2023 at 09:59:53AM -0500, Willem de Bruijn wrote: > K?ry Maincent wrote: > > On Wed, 08 Mar 2023 10:28:51 -0500 > > Willem de Bruijn wrote: > > > > > > > > > > + enum timestamping_layer selected_timestamping_layer; > > > > + > > > > > > can perhaps be a single bit rather than an enum > > > > I need at least two bits to be able to list the PTPs available. > > Look at the ethtool_list_ptp function of the second patch. > > In the available bitmap, yes. Since there are only two options, > in the selected case, a single bit would suffice. It was a bit tongue in cheek, but in an earlier thread discussing this problem, i listed how there could be up to 7 time stampers on the path from the RJ45 to the network stack. We got into this problem by assuming there could only ever be one time stamper. Lets try to avoid potential problems of assuming there can only every be two time stampers by assuming there can be N stampers. Andrew