Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp645539rwb; Tue, 25 Jul 2023 23:57:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlHKBVMVuQ7ktWv14aenL3w7TAvuE86gNVxwVDkvETVYMajRFsLH4NHR45toX1SJBTYZrsEr X-Received: by 2002:a05:6a20:b903:b0:132:cc63:b099 with SMTP id fe3-20020a056a20b90300b00132cc63b099mr1127788pzb.57.1690354623814; Tue, 25 Jul 2023 23:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690354623; cv=none; d=google.com; s=arc-20160816; b=stOcaTEMm7xih2BfJBpjXpgiPJCEeBfWaEBnfvrQU0bi1uB5nbnJOAIulSxhLEZew1 nXeUXTcb09xb580cY2CuJuz6Ks3uZxkRDlgj5Nzm3JFgiFgwFqbx0J8/TOtta8APrPch WySX5cqg+OG4WT37VBXYN9yrRD+3i3bkDcDvVxS5l5TiNfcMmu9/9J7ejiYDfxeKR5Po jFUTJrCNt/Vtl4Pbegc4vZcZc2344mr1qtpvvlbmLOhgtj57fsbUTRg97kKK1wWd7vvY NuCxgcrZkBnNr6wmIkQCPa7hNsxtA2Z7usf4ah/nTGGSixbdvBOo4AudA7j96QGZLg2m h5RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=A1U3aOnLxKJ4cFSdg2r35krS1yOWkNVAUFjxkXbwTXM=; fh=tAA9uf5ayXmAc5uBlJIB8Uet9HClUkMnAEyLzRVHqn8=; b=Uu8Zq/AdjQXx0uL/VX1wQpxmdseI4IjfL07UxNndE8DKXJq9GT1PVASDQ/IUsTrGm2 f7qHjvM0Iu3RcuXbVtc+W2djV3YNIa0QgRHxp1ISvU/T/ZqScCvpWpbXgiAWKKzzSybP Cnd9agu5lz6Nq47VhzsAZCemhXA5MvqrrUAT7CtOHke6VexYKFaRpHf/w1ti6KZvVV8y KWJmAb/eVsXw3mt7jU+WwSSXM/Hf8sWhqQSoG7kqAFcnXlU+VnpID5yzyfUFOmgH7nwu Ecr1taVdFmnQxJAEQ7+OJ8J0F2tnxgZCUbxEQ5GUap9maO5T7DhimHtWXqV2ulRXbogv o6jQ== 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 w67-20020a636246000000b00563e2b93518si641425pgb.450.2023.07.25.23.56.51; Tue, 25 Jul 2023 23:57:03 -0700 (PDT) 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 S230494AbjGZGFT (ORCPT + 99 others); Wed, 26 Jul 2023 02:05:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230058AbjGZGFQ (ORCPT ); Wed, 26 Jul 2023 02:05:16 -0400 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 4BCB2170D for ; Tue, 25 Jul 2023 23:05:15 -0700 (PDT) Received: from moin.white.stw.pengutronix.de ([2a0a:edc0:0:b01:1d::7b] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOXdY-0006Dv-Gs; Wed, 26 Jul 2023 08:04:40 +0200 Received: from pengutronix.de (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id B74FB1FAD7A; Wed, 26 Jul 2023 06:04:37 +0000 (UTC) Date: Wed, 26 Jul 2023 08:04:37 +0200 From: Marc Kleine-Budde To: Richard Cochran Cc: Jakub Kicinski , Johannes Zink , linux-kernel@vger.kernel.org, kernel@pengutronix.de, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Alexandre Torgue , Russell King , kernel test robot , Eric Dumazet , Jose Abreu , Maxime Coquelin , Giuseppe Cavallaro , Paolo Abeni , "David S. Miller" , linux-arm-kernel@lists.infradead.org, patchwork-jzi@pengutronix.de Subject: Re: [PATCH v2] net: stmmac: correct MAC propagation delay Message-ID: <20230726-dreamboat-cornhusk-1bd71d19d0d4-mkl@pengutronix.de> References: <20230719-stmmac_correct_mac_delay-v2-1-3366f38ee9a6@pengutronix.de> <20230725200606.5264b59c@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xnhwr73ip5umpg2f" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:b01:1d::7b X-SA-Exim-Mail-From: mkl@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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 --xnhwr73ip5umpg2f Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 25.07.2023 20:22:53, Richard Cochran wrote: > On Tue, Jul 25, 2023 at 08:06:06PM -0700, Jakub Kicinski wrote: >=20 > > any opinion on this one? >=20 > Yeah, I saw it, but I can't get excited about drivers trying to > correct delays. I don't think this can be done automatically in a > reliable way, At least the datasheet of the IP core tells to read the MAC delay from the IP core (1), add the PHY delay (2) and the clock domain crossing delay (3) and write it to the time stamp correction register. (1) added in this patch (2) future work (3) already in the driver, though corrected manually when reading the timestamp At least in our measurements the peer delay is better with this patch (measured with ptp4linux) and the end-to-end delay (comparison of 2 PPS signals on a scope) is also better. > and so I expect that the few end users who are really > getting into the microseconds and nanoseconds will calibrate their > systems end to end, maybe even patching out this driver nonsense in > their kernels. What issues make you think this change/approach is counterproductive? > Having said that, I won't stand in the way of such driver stuff. > After all, who cares about a few microseconds time error one way or > the other? There are several companies that use or plan to use PTP in their products and are striving to achieve sub-microsecond synchronization. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung N=C3=BCrnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 | --xnhwr73ip5umpg2f Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEDs2BvajyNKlf9TJQvlAcSiqKBOgFAmTAt3IACgkQvlAcSiqK BOh0DAgAqG6sHE3eeulbdXpyxVkjVIcKYjN/Hdv69xC9upUFvYFR+OQx4UoUbqCj cDnLoipaxlcGfUob+Qr9QYUKjVI9TVqY82sU6LJ2DsbRAXdE7v7Pp/cINSatJ0Vq Sb7Srv7RG2Xh+4oLChZ7fm2BGfoTehVQh0W3VpVXhIeMmGWeNFankax+sPOwYPfK /OIQ/OYKRW0EI2Hrhbb/wnGv8cUCUSj5ZxQsc2rNJptWwQE1Ps/ljCOCyeyP8Alu OOjGHjN1pjzZKg5hnOeKTKmmN9r5e5mD0EuSIm5PCtAQnCu2FOkQh1C+uyjNLx6m jibMx4NFgoCRMo76PJp1y4m6hzEtkw== =4iaa -----END PGP SIGNATURE----- --xnhwr73ip5umpg2f--