Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3031156rdg; Tue, 17 Oct 2023 02:22:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+6hKhNbQ9X5MDCZG810JMDah3i8gIlqLAo7q6/bIsTA4aNaEE0xndTAs5Z4TXKnL3Orfl X-Received: by 2002:a05:6a21:7189:b0:154:e793:52b3 with SMTP id wq9-20020a056a21718900b00154e79352b3mr1495127pzb.0.1697534527197; Tue, 17 Oct 2023 02:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697534527; cv=none; d=google.com; s=arc-20160816; b=KBw0axYDSNPnkwqwHzrJDpFrIbrhEgSYjXTeX1dYtfJBF0S9FozuWoSb2oQBVG0HSA oW+qyZc5ltcm5WMUVN9KucBWZ21RLH6KlZ6j75bZBxLRtiH4RJicyyKhYiX7BecFFGZD cMiE84e6arV5m/uWENo594Hiam1NAOVEVB3ems0eUbZjVxZMKZJx+JPg7MBo10RMA+fu 2EcqDayQXT/aemlQ6UoBhBBcVoQLZCcjzstCuwHPNa5pIji6r34b0IpBEmtqMjphIuDH W5T0935uWmdb8L2ktNNjGCtMdcKKh992QaBZtXmCyQkihbX2aaoi3Ww58hFDk3eM4gPz r5/w== 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=URU2Msd1JV3mmAQRvAa9Xwc0yE40juXPkEqApuI7tHk=; fh=/u263xLEZxProE1ptX2k6iXzYfTwN3EH6iqes09BNYk=; b=oxxnqtZdRTRt8EtnorZlWFIFqAr5lMAx9z9L/MHRDtzgRRSuUwUmJGMwqKMkSouL6o E+YTEqSGPt6g+huao94DlvX71agXfZbi3CinP5JDdEpnkWX3072g/sSWBX/+g+PDMKTE i0c+dR2Uy2Q0hu33fqWa/ZVTdnR5yMBPQLui7Zlm8h9MM3Hr5tgsw+UTjSP3cLgUZoQi 58YMzCR/gY0DES850trdtOCETYLut3AIEZcEZY3dMnkxGNNj3tTBYe0nqyUtOhTPA3lw S6Ltv6szfuApGcZicIuAbBthKamxql0cny+1dxOlG5TFkerSWwEzrGSgJtBBTkqb6Qjl EELg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lkHmRQyw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id k4-20020a170902d58400b001c7264c458dsi1370166plh.181.2023.10.17.02.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:22:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lkHmRQyw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 44C3D803DBB5; Tue, 17 Oct 2023 02:22:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234647AbjJQJVt (ORCPT + 99 others); Tue, 17 Oct 2023 05:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234966AbjJQJVh (ORCPT ); Tue, 17 Oct 2023 05:21:37 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B7A2121; Tue, 17 Oct 2023 02:21:31 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 12FE6FF806; Tue, 17 Oct 2023 09:21:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1697534490; 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=URU2Msd1JV3mmAQRvAa9Xwc0yE40juXPkEqApuI7tHk=; b=lkHmRQyw+miKlH74ilaYWkL2wK/zyDpmOBF4iy0LzuVV5zUFjgG320qaNHrt1yeLpsVK4f ovOzjgxduw/pBroEthTnQeJ9g5zblI16zVDtVMwPn3sNl79n1tqJMaPQO8tDpW22mMVZSM yl35FJtscrmERdmIJyociDxx+Bp48hi+vPmFGcvHEHYNW3u8Ep/ppFH+Y2AIJCen7wC421 MHMEmC6oUd0iDDAAXVemAs9vhY2AfH3fJBeT09QuYORl3JnbApX0Hptsk2CSC/LzjYsqK9 UYwf5E/9EGWmrgRVh9ysl5mwLRWbcHwJe0lbQ39SrOHEenK93sU7qWsiZyrc5A== Date: Tue, 17 Oct 2023 11:21:22 +0200 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Jacob Keller Cc: Jakub Kicinski , Andrew Lunn , Florian Fainelli , , , , Thomas Petazzoni , "David S . Miller" , Eric Dumazet , Paolo Abeni , "Jonathan Corbet" , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , "Claudiu Beznea" , Horatiu Vultur , , "Broadcom internal kernel review list" , "Heiner Kallweit" , Russell King , Richard Cochran , Radu Pirea , Willem de Bruijn , Vladimir Oltean , Michael Walle , Maxime Chevallier Subject: Re: [PATCH net-next v5 08/16] net: ethtool: Add a command to expose current time stamping layer Message-ID: <20231017112122.1548bb57@kmaincent-XPS-13-7390> In-Reply-To: References: <20231009155138.86458-1-kory.maincent@bootlin.com> <20231009155138.86458-9-kory.maincent@bootlin.com> <2fbde275-e60b-473d-8488-8f0aa637c294@broadcom.com> <20231010102343.3529e4a7@kmaincent-XPS-13-7390> <20231013090020.34e9f125@kernel.org> <6ef6418d-6e63-49bd-bcc1-cdc6eb0da2d5@lunn.ch> <20231016124134.6b271f07@kmaincent-XPS-13-7390> <20231016072204.1cb41eab@kernel.org> <20231016170027.42806cb7@kmaincent-XPS-13-7390> <20231016084346.10764b4a@kernel.org> <20231016182307.18c5dcf1@kmaincent-XPS-13-7390> <20231016100313.36d4eab9@kernel.org> 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.8 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 howler.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 (howler.vger.email [0.0.0.0]); Tue, 17 Oct 2023 02:22:03 -0700 (PDT) On Mon, 16 Oct 2023 16:03:13 -0700 Jacob Keller wrote: > On 10/16/2023 10:03 AM, Jakub Kicinski wrote: > > On Mon, 16 Oct 2023 18:23:07 +0200 K=C3=B6ry Maincent wrote: =20 > >>> What's the reason for timestamp precision differences? > >>> My understanding so far was the the differences come from: > >>> 1. different stamping device (i.e. separate "piece of silicon", > >>> accessed over a different bus, with different PHC etc.) > >>> 2. different stamping point (MAC vs DMA) > >>> > >>> I don't think any "integrated" device would support stamps which > >>> differ under category 1. =20 > >> > >> It was a case reported by Maxime on v3: > >> https://lore.kernel.org/netdev/20230324112541.0b3dd38a@pc-7.home/ =20 > >=20 > > IMHO this talks about how clock control/disciplining works which > > is a somewhat independent topic of timestamping. =20 >=20 > The thread in question mentions that the device has two modes, one which > has higher precision for the timestamps, and one which has better > precision on frequency adjustments. I don't know the details for why the > hardware has this behavior, but being able to switch between the two > timestamp modes has value as described by the thread. >=20 > I'm not sure how to represent that in such an API because both modes > seem to capture the timestamp at the MAC. After some thought, indeed moving back to MAC/PHY_TIMESTAMPING seems better. This case of several timestamp modes in MAC is currently only for the speci= al stmmac case. We could support it the same way we could support multiPHY by saving the source id of the timestamp like this in net_device: struct { enum ts_layer layer, int source_id, } ts