Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2140901rdb; Mon, 20 Nov 2023 03:16:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+/CAjjrkeUZuUnzd0/jaimlP3QZdTgYnSI/69tiU/B8b1HEPNK9wS+TMQzOLXJgeMEo8H X-Received: by 2002:a05:6808:17a8:b0:3a7:b094:8f2 with SMTP id bg40-20020a05680817a800b003a7b09408f2mr11454054oib.45.1700478986310; Mon, 20 Nov 2023 03:16:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700478986; cv=none; d=google.com; s=arc-20160816; b=Lyq6JMakenhEXkDeOzui42xhlZRLdCa62C4Bn+qHUisW4ZdZ0D4OQOCizbTfpHY/Kn G0qvP7lp8IHUhP2q7eSyAQ/rckrZS5WIXgVqOGRJ+e7Uk9hWR1PGWpFVSe2OaDw/2/eV kIV3YO7gaObbpYMJgD6PEVknoGB1wC9u5Ixs7N50yZAso8cDxjujb/c+kGgdE7nsYjg8 0/6U7P5hzYT1mW9uRdrbcTlbqALICVHGnn4zROz99gtaxZG9e52ZQWIZZsV9fNJvQ3fL k6fRZtRbhjZreqEBaAmYv+le3/a0jwm6fEdXcr6penYAysnLCm3nT9+RMo5LhpanWQvd Pj5w== 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=4fOmr1EeD2uGJyE5b6S6DHbDXU7wDK5HnO7BStGLZ7U=; fh=MWt/aau18iZB4cBNRDtmAfDw6lQMgSQj1JsFQe1KAAc=; b=XrLzttGXHY+IeOZRXss3GH+zgU1fNkKhCGM/9M11CYO64m3ZhUbfzWwqx8SqgqjIma TRnlSW9SkyQ6zz36RcDuONvSYg6JoIdqdhM75xauFMaOvXCA8jJLHg+FUJpfCEGQhnb4 UhaiCIITqFSJDmUE1GY+5zdSKn9tYb32Bt8KOa7rdXY7D5Cd6YDZ9hpJZqYj2kNPZbk0 koFVscuJdwp0ZTNUBkZZJC0Q/E84bkXyper4o3a0aLPmH/nd7DhHLrO7nJTT+D6VKsYE JmZJZ+9Q8CbyE9mCrAo+d38OpVoZOFQ6VBGOzm8ij/dUgljShxl5uezUFzVkdvxqrjvv 8QUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ZmThG8/n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id 195-20020a6302cc000000b005b8eb9d7ff1si7852411pgc.762.2023.11.20.03.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 03:16:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="ZmThG8/n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id D779280A64F4; Mon, 20 Nov 2023 03:16:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233001AbjKTLO6 (ORCPT + 99 others); Mon, 20 Nov 2023 06:14:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233208AbjKTLOu (ORCPT ); Mon, 20 Nov 2023 06:14:50 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55890F0; Mon, 20 Nov 2023 03:14:44 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 98CF31C000D; Mon, 20 Nov 2023 11:14:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700478883; 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=4fOmr1EeD2uGJyE5b6S6DHbDXU7wDK5HnO7BStGLZ7U=; b=ZmThG8/njdOgch0QqfERanqoa7ROiFYwMdVehhBXSBXv6M/Bs5YtwXRvadRrFJKOK2jJZ2 ykPahvc5xvDZcxQSqPm3VLdqOqG4oLhrwr1/qsZBeMZoiviapny0f5T4xfNtVtC5UU58gy Y0R3Eg3Pne48VT1UfGWZz2PjmtbNvL3uOS89a4USeBNd8gGO7lgLCndb29rnWgDBPjXGZX 7GyDSWEoJfXwckKtkkFHVnFoKVPbPPiwYMGvuaQrNbP1mwyIPIPEBEp5ZNrV0YZz4xutdB xHWmRNHnXfSqMO9PWRm88UhBgOjb/qnT9DnY6sdcTdL8Ks2Nl5N6AVMyohi0RQ== Date: Mon, 20 Nov 2023 12:14:40 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Vladimir Oltean Cc: Jakub Kicinski , Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier Subject: Re: [PATCH net-next v7 15/16] net: ethtool: ts: Let the active time stamping layer be selectable Message-ID: <20231120121440.3274d44c@kmaincent-XPS-13-7390> In-Reply-To: <20231120105255.cgbart5amkg4efaz@skbuf> References: <20231114-feature_ptp_netnext-v7-0-472e77951e40@bootlin.com> <20231114-feature_ptp_netnext-v7-15-472e77951e40@bootlin.com> <20231118183433.30ca1d1a@kernel.org> <20231120104439.15bfdd09@kmaincent-XPS-13-7390> <20231120105255.cgbart5amkg4efaz@skbuf> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com 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,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 03:16:03 -0800 (PST) On Mon, 20 Nov 2023 12:52:55 +0200 Vladimir Oltean wrote: > > > So you only support PHYLIB? > > >=20 > > > The semantics need to be better documented :( =20 > >=20 > > Yes as we don't really know how each MAC deal with the timestamping > > before ndo_hwstamp_get/set. Using phylib only allows us to be sure these > > NDO are implemented and the management of timestamping is coherent in t= he > > MAC. Also It will push people to move on to these NDOs. > >=20 > > Ok I will add documentation. >=20 > When Jakub says "the semantics need to be better documented", I'm also > thinking of a different direction. >=20 > From what I understand, Maxime is working on representing multiple > phylib PHYs in the UAPI: > https://patchwork.kernel.org/project/netdevbpf/cover/20231117162323.62697= 9-1-maxime.chevallier@bootlin.com/ Yes I am also following his patch series.=20 =20 > Does your UAPI proposal make it possible in any way to select > timestamping in phylib PHY A rather than PHY B? Or do you think it is > extensible to support that, somehow? It does not support it for now. I didn't want to base my work on his series as it could work without it for= now and I didn't want to wait to have his series accepted. It is more a future possible support as I don't have anything to test it and I don't know if su= ch hardware exists right now. I think it will be extensible to support that, my thinking was to create th= is struct in net_device struct: struct { enum layer; u32 id; } ts; With id saving the phy_index of the PHY X used when the layer PHY is select= ed. This id could also be used to store the timestamp point in case of several timestamp in a MAC. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com